Re: Avoiding Escape Sequence....



Stefan is correct about the backslash escape, but are you sure you aren't
trying to store some uninitialized part of the char array. Perhaps you
should memset() the array to all 0's (NULLs) before adding the string to it
just to clear out the junk at the end of the string, or, just store up to
the NULL in the array which looks like the only useful part anyway.

Tom

"Stefan Ascher" <me@xxxxxxxx> wrote in message
news:MPG.1f0b57e654059b49989682@xxxxxxxxxxxxxxxxxxxxxxx
In article <1151402827.560272.270660@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Wallace says...

when I store a char array with
"20005Admin01151R/??ÿ1Êuü>¼L+'?`?ÀÍ.b<§üY?­.'Ö]r>?.IÑ?Ãi Ͽӻ:´Ýù9
.?.ÄTd.câG??i??2?.ú`NÄÈ?<B÷ lº?À'.
pYü¡.??å¹?«?p.\"²ÊB°7Ù?Ïÿ¡Á" values, it is
telling as '"' : unrecognized character escape sequence. How to
overcome this escape sequence?
Thanx in advance...

There is a backslash in this string, you should escape it with another
backslash:
pYü¡.??å¹?«?p.\\"²ÊB°7Ù?Ïÿ¡Á"
--------------^
--
stefan


.



Relevant Pages

  • Re: Unrecognized escape sequences in string literals
    ... character without knowing the context, ... '\n' maps to the string chr. ... In both cases the backslash in the literal have the same meaning: ... escape every backslash, ...
    (comp.lang.python)
  • Re: More crimes in Singapore !
    ... Truth don'e lie. ... Indian refugees escape Aussie detention centre ... from a detention centre in southwest Sydney on Thursday morning. ... Police say a takeaway food store was robbed at knife point in Lowood ...
    (soc.culture.singapore)
  • Re: Unrecognized escape sequences in string literals
    ... how unrecognized escape sequences are treated in Python. ... a backslash is just an ordinary character, ... Why should a backslash in a string literal be an error? ...
    (comp.lang.python)
  • Re: Doubling backslashes in JavaScript - its unorthodox, but it works...
    ... fileString = unescape; ... doesn't actually contain a backslash at the time of the attempt to ... True, but, assigning it to another variable had no impact on what was being written/alerted. ... it is always better to have the server escape it. ...
    (comp.lang.javascript)
  • Re: More Escaped from detention in Australia
    ... More than 500 escape from detention centre ... An Immigration and Multicultural Affairs Department spokesman said about ... Indian refugees escape Aussie detention centre ... Police say a takeaway food store was robbed at knife point in Lowood ...
    (soc.culture.singapore)