[RFH] Trouble with mbsrtowcs and "\244" (Euro symbol)

Jakub Jelinek jakub@redhat.com
Mon May 13 01:54:00 GMT 2002


On Mon, May 13, 2002 at 09:31:11AM +0200, Paolo Carlini wrote:
>   wstring result4 = oss.str();
>   assert( result4 == L"7.200.000.000,00 \244");
> }
> 
> I wrote the testcase dumbly copying it from the corresponding char case, 
> that is simply prepending L to the expected result4. But now I see that 
> this is incorrect since, according to Unicode Euro is 8364. Therefore, I 
> suppose, in preparing this kind of testcase, the last char should be 
> compared separately from the former.
> 
> Thoughts?

Err, why you cannot just:

  assert( result4 == L"7.200.000.000,00 \x20ac");

(the test works just fine then, provided the setlocale call is uncommented
(otherwise U20AC might not be in LC_CTYPE and as such not added at all)).

	Jakub



More information about the Libc-alpha mailing list