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 MO MA.
So why does it not print (as it should):
ร่วมรส ?

This is not really reproducible, but happens in about 3% of all lines.

Known error, or my mistake?
Or some well meant attempt to prevent any form of indecency appearing on my 
screen (ร่วมรส = copulate)?

Gerriet.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to