Thread: escape and use apostrophe

  1. #1
    Registered User
    Join Date
    Aug 2010
    Posts
    1

    escape and use apostrophe

    friends,

    i am in need of some expert c coder advice.

    i admin a mailserver , qmailtoster.
    that checks a user address to make sure ( hopefully ) that it is not a spam machine bot.

    anyways -- it uses a func called check user

    here is a doc on how that goes to allow a \

    CHKUSR - Enable characters for Blackberry devices - QMail-Toaster

    in short -- i need to allow an ' within a account name

    I was wondering - i am no C coder myself -
    if i do it wrong - can i do harm? -
    meaning if i did : define CHKUSER_ALLOW_SENDER_CHAR_3 "'"
    might it fail to compile ?
    or if it compiles might it simply fail to allow the apostrophe?
    mostly - dose anyone think - i could do 'harm' by errant attempts
    my list of trys might be
    CHKUSER_ALLOW_SENDER_CHAR_3 ''' [ apostrophe apostrophe apostrophe ]
    CHKUSER_ALLOW_SENDER_CHAR_3 "'" [ dblQuote apostrophe dblQuote }
    CHKUSER_ALLOW_SENDER_CHAR_3 '\'' [ apostrophe escapeSlash apostrophe apostrophe ]
    if any BIG C coders have a suggestion -- i would welcome the wisdom
    thanks

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > here is a doc on how that goes to allow a \
    Except they say it's a / and not a \

    The instructions seem detailed enough - what's the problem?

    > mostly - dose anyone think - i could do 'harm' by errant attempts
    Mostly it will fail to compile if you mess up what should be between the double quotes.
    If that's your only change and it compiles, then you should be good.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed