• 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: converting from Big 5 and GuoBiao encodings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting from Big 5 and GuoBiao encodings


  • Subject: Re: converting from Big 5 and GuoBiao encodings
  • From: Aki Inoue <email@hidden>
  • Date: Thu, 10 Jan 2008 23:08:01 -0800

You can get NSStringEncoding IDs for these encodings by converting CFStringEncoding.

To get the Mac variant of Big5 (Mac Traditional Chinese), you can do CFStringConvertEncodingToNSStringEncoding (kCFStringEncodingMacChineseTrad).

Refer to http://developer.apple.com/documentation/CoreFoundation/Reference/CFStringRef/Reference/reference.html#/ /apple_ref/c/func/CFStringConvertEncodingToNSStringEncoding

Aki

On 2008/01/10, at 19:22, Daniel Child wrote:

Hi,

I am trying to build a generic parser for various files I expect to encounter. To get the file in the form of a string, I was going to use:

NSString *fileAsString = [[NSString alloc] initWithContentsOfFile: sourcePath
encoding: NSUTF8StringEncoding
error: &error];


That works assuming the encoidng is UTF8. But what if it is Big 5 or GuoBiao? I couldn't find an equivalent encoding in
the documentation.


Thanks.

Daniel

_______________________________________________

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

_______________________________________________

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: 
 >converting from Big 5 and GuoBiao encodings (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: Using NSValueTransformer for encryption
  • Next by Date: BMP bug in ImageIO?
  • Previous by thread: converting from Big 5 and GuoBiao encodings
  • Next by thread: newbie:how to get the frontmost window but a key window
  • Index(es):
    • Date
    • Thread