Re: Avoiding Escape Sequence....



The use of 8-bit characters as characters is problematic in the C language. At the
moment, it is only really defined for characters in the range of 001..0176 (0x01..0x7E),
although the standard is a bit vague in what it calls an "execution character set".

In the string below, I see the \ preceding a ", so if it isn't escaped as shown, the quote
mark will be misinterpreted as a closing quote. You might also be having problems with ??
values, e.g., see the ANSI C standard §5.2.1.1:
??= #
??( [
??/ \
??) ]
??' ^
??< {
??! |
??> }
??- ~

and I see several ?? sequences which appear in the string and which are therefore
undefined, and this may be the source of the problem.
joe

On Tue, 27 Jun 2006 15:58:38 +0200, Stefan Ascher <me@xxxxxxxx> wrote:

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Ù?Ïÿ¡Á"
--------------^
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: String literals in Java
    ... """ can have escape sequences like ... any normal string. ... characters: a backslash and a lowercase "n". ...
    (comp.lang.java.programmer)
  • Re: SendKey problem with doubleused keys
    ... > one of the backslash characters is changed to its correspondent 'non Alt Gr' ... > the real case of the string characters given to be sent. ...
    (microsoft.public.vb.winapi)
  • Re: Newbie need help
    ... you just lucked out by using a different string. ... the source translator to construct special characters. ... backslash followed by a lower case t. ... because '\t' is the tab character, ...
    (comp.lang.python)
  • SendKey problem with doubleused keys
    ... one of the backslash characters is changed to its correspondent 'non Alt Gr' ... the real case of the string characters given to be sent. ...
    (microsoft.public.vb.winapi)
  • Re: online awk application - viable
    ... feasibility of writing a web application to carry out pattern matching in ... The main problems are that the browser will escape some characters in the ... # character for the original escape sequence. ... # Hex is a string in the form \xnn where n is in the set 0-9a-f. ...
    (comp.lang.awk)