Re: ASL & Unicode in Xcode's Console
Re: ASL & Unicode in Xcode's Console
- Subject: Re: ASL & Unicode in Xcode's Console
- From: Karl Moskowski <email@hidden>
- Date: Tue, 28 Oct 2008 16:17:07 -0400
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 log
to 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 form
in 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 should
be 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@hidden>
Voodoo Ergonomics Inc. <http://voodooergonomics.com/>
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden