Re: \x and strings



Hallo Frank!

The escape sequence for embedded bytes is three characters following the \x so your "unicode" example is the correct way for non-unicode strings, a\x001bc will work properly for single byte characters.

Sure? I am confused now...

I just found this in the docs:
Mobile and Embedded Development
  Embedded Operating System Development
    Windows CE
      Windows CE .NET
        Product Documentation
          Development Tools
            Microsoft Embedded Visual C++ 4.0
              C/C++ Language Reference
                C++ Language Reference
                  Lexical Conventions
                    Literals
                      C++ Character Constants

Octal escape sequences, specified in the form \ooo, consist of a backslash and one, two, or three octal characters. Hexadecimal escape sequences, specified in the form \xhhh, consist of the characters \x followed by a sequence of hexadecimal digits. Unlike octal escape constants, there is no limit on the number of hexadecimal digits in an escape sequence.

Anybody here who has a copy of the standard?

--
Martin Richter [MVP] WWJD
"In C we had to code our own bugs. In C++ we can inherit them."
FAQ : http://www.mpdvc.de
Samples: http://www.codeguru.com http://www.codeproject.com
.



Relevant Pages

  • Re: newline in arrayelement
    ... These characters include: the backslash (which must be escaped first ... and 2029 ), backspace, form-feed, horizontal tabs and vertical tabs ... (which should be escaped to Unicode or Hex escape sequences rather than ...
    (comp.lang.javascript)
  • Re: newline in arrayelement
    ... The newline that was stored in the database, ... These characters include: the backslash (which must be escaped first ... and 2029 ), backspace, form-feed, horizontal tabs and vertical ... tabs (which should be escaped to Unicode or Hex escape sequences ...
    (comp.lang.javascript)
  • Re: file open fails.
    ... characters long. ... all unrecognized escape sequences are left in the ... string unchanged, i.e., the backslash is left in the string. ...
    (comp.lang.python)
  • Re: RfD - Escaped Strings (long)
    ... (Anton Ertl) ... Actually we should restrict that to a few characters, ... escape sequences should the need ever arise. ...
    (comp.lang.forth)
  • Re: SPY++, WM_CHAR, and ALT+<+>+ keyboard entry
    ... Note that the numeric keypad does not have the hexadecimal digits A-F. ... numeric keypad can be used to enter characters but it uses decimal. ... It displays properly in Notepad. ... all of the Notepad windows (the main window and the child Edit ...
    (microsoft.public.win32.programmer.ui)

Loading