On 28-Oct-08, at 4:03 PM, Jason Coco wrote:
This is a known issue... you can see where the mangling happens in the source code online when writing to stderr... the characters are properly encoded when sent to syslog and will show up correctly in asl queries and the console application, as you saw. I output japanese to logs a lot and have never really had a problem, except that during debugging I have to use console in those cases and not rely on general output. There are a number of bug reports on the issue, but I doubt it's a very high priority since it write the logto the database correctly.If you absolutely need this functionality, it's actually encoding it in some visual encoding form (you can see more about the formin the source code) so you could, in theory, handle it if you had to.Also, you should not be using non-ascii characters in string literals :) hopefully you're just doing this to demonstrate the issue. You shouldbe doing something like this: char *hiragana_a = { 0xE3, 0x81, 0x82, 0x00 };NSLog(@"%@", [NSString stringWithCString:a encoding:NSUTF8StringEncoding]);asl_log(client, NULL, ASL_LEVEL_ERR, a);
Thanks, Jason.Yeah, it was just for demo purposes. In actuality, the messages will be constructed, e.g., from file names.
Anyway, I've filed a bug (#6326169), in case anyone wants to jump on the bandwagon.
---- Karl Moskowski <[EMAIL PROTECTED]> Voodoo Ergonomics Inc. <http://voodooergonomics.com/>
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]