• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: ASL & Unicode in Xcode's Console
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >ASL & Unicode in Xcode's Console (From: Karl Moskowski <email@hidden>)
 >Re: ASL & Unicode in Xcode's Console (From: Jason Coco <email@hidden>)

  • Prev by Date: Re: Binding question
  • Next by Date: Re: Binding question
  • Previous by thread: Re: ASL & Unicode in Xcode's Console
  • Next by thread: Re: ASL & Unicode in Xcode's Console
  • Index(es):
    • Date
    • Thread