Re: Possible Clang Bug in Initializing Wide String From String Literal?
Re: Possible Clang Bug in Initializing Wide String From String Literal?
- Subject: Re: Possible Clang Bug in Initializing Wide String From String Literal?
- From: Sean McBride <email@hidden>
- Date: Thu, 19 May 2011 17:46:49 -0400
- Organization: Rogue Research Inc.
On Thu, 19 May 2011 17:56:26 +0200, Andreas Grosam said:
>// UTF8-encoded source file
>
>#include <stdio.h>
>#include <wchar.h>
>
>int main (int argc, const char * argv[])
>{
> char s[] = "ü";
> wchar_t ws[] = L"ü";
> printf("number of characters in narrow string: %lu\n", sizeof(s)/
>sizeof(char) - 1 );
> printf("number of characters in wide string: %lu\n", sizeof(ws)/
>sizeof(wchar_t) - 1 );
Did you pass -finput-charset= ? Also, use %zu for size_t, though I'm
sure that's not the problem.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden