Re: \x and strings



Hallo John Carson!

"Martin Richter [MVP]" <martin.richter@xxxxxxxx> wrote in message
news:d3laie$d1s$1@xxxxxxxxx


If it is a non-unicode string a\x01bc will do it.

If it is a unicode string use
a\x001bc



Have you tried compiling this? (It doesn't compile for me.)

No. I am sorry about the wrong infos.

I just read the docs. And I thought that the parser stopped after 2 or 3 chars, becuase the docuemntation should explicitly 2 and 3 chars after \x. In fact it parses all chars unti it find a character not matching the sequence and this causes an overflow.
So the only way is what John Carson wrote.


--
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: Possible Bug: name of directory inhibits execution?
    ... I just proved it by actaully using the above code, compiling it, and put in ... it's OK up to 257 chars for me. ... No - it would appear to be a CLR quirk/bug to me. ... any problem with path lengths up to _MAX_PATH length. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Read Unicode string from a file
    ... "WWinMainCRTStartup" thing helped OK. ... compiling. ... And I can read Unicode string from file, ... CStdioFile file; ...
    (microsoft.public.vc.mfc)
  • Best ways of managing text encodings in source/regexes?
    ... those strings contain only ASCII or ISO-8859-1 chars? ... standard library modules such as re don't declare an encoding, ... then read the source file into a unicode string with codecs.read, ...
    (comp.lang.python)
  • RE: Looking For mp3 ID Tag Module
    ... so it could have non-ASCII chars in it. ... How are you getting the filename? ... try passing the path name as a unicode string: ... anti-virus service working around the clock, around the globe, visit: ...
    (comp.lang.python)
  • Re: gdiplus unicode string
    ... Is there a codepoint or something ... else to insert in the unicode string to tell gdi+ there is special ...
    (microsoft.public.win32.programmer.gdi)

Loading