Re: Unicode strings and ascii regular expressions
Fredrik Lundh wrote:
> Fuzzyman wrote:
>
> > Can someone confirm that compiled regular expressions from ascii
> > strings will always (and safely) yield unicode values when matched
> > against unicode strings ?
[snip..]
>
> ascii patterns work just fine on unicode strings. the engine doesn't care
> what string type you use for the pattern, and it always returns slices of
> the target string, so you get back what you pass in.
>
Thanks - that's what I hoped. :-)
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
> </F>
.
Relevant Pages
- Re: How do you define a UniChar constant?
... > issue (not to mention various other advantages of simple ASCII) ... > 2) Unicode strings are needed instead of simple ASCII string to support ... > various international characters not available in ASCII ... (comp.sys.mac.programmer.codewarrior) - Re: How to check variables for uniqueness ?
... characters is the sequence SS. ... is simply capitalizing strings. ... The fact that case mapping in English /is/ simple is neither here not ... That is a fair criticism of the Unicode position. ... (comp.lang.java.programmer) - Re: Dangerous behavior of CString
... If I'm reading a data file or serial port or something, if the raw data are multibyte but the compilation is Unicode or vice-versa, then sometimes the converting constructors in CString are convenient. ... I did not actually write code like this; in fact I was pretty careful always to use the _T macro with any literal strings. ... But it does the conversion using the current 8-bit code page, which is not what I want. ... (microsoft.public.vc.mfc) - Re: Converting MBCS project to UNICODE compliant.. Pros and Cons
... I've never dug this deep, but I've been told that much of the OS relies on Unicode strings so when passing strings to a control, or whatever, they are converted to Unicode somewhere along the line. ... switch back to ASCII. ... If the filenames you're retrieving are already in Unicode there may be some performance difference in converting them to ANSI to store them in your map. ... (microsoft.public.vc.language) - Re: Help please
... i would like to provide "CSimString" class code because the settings ... I agree with Tom that first step is project clean and rebuild all. ... with a Unicode string, ... Consider that VS2005 strings are Unicode by default, ... (microsoft.public.vc.mfc) |
|