[Patch] Fix wide char locale support(like CJK charset) in regex

Paolo Carlini paolo.carlini@oracle.com
Fri Oct 18 01:16:00 GMT 2013


Hi,

On 10/18/2013 01:17 AM, Tim Shen wrote:
> +  setlocale(LC_ALL, "zh_CN.UTF8");
> +  const wchar_t * s = L"ä½ å¥½, 世+界";
> +  wregex re(s);
> +  VERIFY(regex_match_debug(L"ä½ å¥½, 世世世界", re));
These strings make me a lot nervous: I should check the details of the 
various character sets to tell you something technically accurate (and 
it's late here ;) but really, why don't we use hexadecimal literals, 
like we often do, eg, in 27_io/basic_filebuf/seekoff, seekpos, or 
underflow ?

Thanks,
Paolo.



More information about the Gcc-patches mailing list