I print strings like:
NSString *s = @ร่วมรส;
fprintf(stderr, %s\n, [ s UTF8String]);
and usually it just works.
But sometimes it does not and I get garbage like:
ร่ว\340\270\241รส
Converting these numbers to hex one gets: 0xe0 0xb8 0xa1 which is the Utf8-code
for THAI CHARACTER
On Oct 31, 2012, at 9:41 AM, Gerriet M. Denkmann wrote:
I print strings like:
NSString *s = @ร่วมรส;
fprintf(stderr, %s\n, [ s UTF8String]);
and usually it just works.
But sometimes it does not and I get garbage like:
ร่ว\340\270\241รส
Converting these numbers to hex one
hi-
On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de
wrote:
NSString *s = @ร่วมรส;
Not supported. The compiler should be issuing a warning. You need to escape the
characters using a UTF encoding.
thanks!-
-lance
___
On Oct 31, 2012, at 10:17 AM, lbland wrote:
On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de
wrote:
NSString *s = @ร่วมรส;
Not supported. The compiler should be issuing a warning. You need to escape
the characters using a UTF encoding.
That's not true. The
Le 31 oct. 2012 à 16:17, lbland lbl...@vvi.com a écrit :
hi-
On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de
wrote:
NSString *s = @ร่วมรส;
Not supported. The compiler should be issuing a warning. You need to escape
the characters using a UTF encoding.
I
On 31 Oct 2012, at 22:15, Ken Thomases k...@codeweavers.com wrote:
On Oct 31, 2012, at 9:41 AM, Gerriet M. Denkmann wrote:
I print strings like:
NSString *s = @ร่วมรส;
fprintf(stderr, %s\n, [ s UTF8String]);
and usually it just works.
But sometimes it does not and I get
Le 31 oct. 2012 à 16:31, Ken Thomases k...@codeweavers.com a écrit :
On Oct 31, 2012, at 10:17 AM, lbland wrote:
On Oct 31, 2012, at 10:41 AM, Gerriet M. Denkmann gerr...@mdenkmann.de
wrote:
NSString *s = @ร่วมรส;
Not supported. The compiler should be issuing a warning. You need
On 31 Oct 2012, at 22:15, Ken Thomases k...@codeweavers.com wrote:
On Oct 31, 2012, at 9:41 AM, Gerriet M. Denkmann wrote:
I print strings like:
NSString *s = @ร่วมรส;
fprintf(stderr, %s\n, [ s UTF8String]);
and usually it just works.
But sometimes it does not and I get
On Oct 31, 2012, at 2:42 PM, Gerriet M. Denkmann wrote:
When I run this in Xcode for a few times, I get sometimes good output, but
sometimes not.
Bad output looks like:
2012-11-01 01:56:29.971 Writing[76838:303] strlen 1027
I ran into something similar in my own work, but my solution may not fit your
needs.
printf() won't work reliably for you. My conjecture is that printf buffers its
work byte-by-byte, and if an encoded character falls across a buffer boundary,
the two parts are output as escaped-decimal,
10 matches
Mail list logo