• 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: newbie unicode problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: newbie unicode problem


  • Subject: Re: newbie unicode problem
  • From: "M. Uli Kusterer" <email@hidden>
  • Date: Mon, 31 Jan 2005 12:56:08 +0100

At 23:09 Uhr -1000 30.01.2005, Daniel Child wrote:
I am trying to do a simple app that involves Chinese and bopomofo characters. The app works except for one aspect: I can't seem to get Unicode characters to print correctly to the NSTextFields in the window. I have an entry field and a result field. There are two problems:

- if I type in a character (of any type) into an entry field, it does not seem to be correctly recognized
- if I print a character to the textfield (using setStringValue) it is also not typed correctly to the result field

I think your problem is the C (and ObjC) source files are defined to be ASCII only. So, string constants specified in source files can only contain ASCII characters (comments are an exception, IIRC, because they are stripped anyway).


Use a Localizable.strings file or a .plist file and get your strings from there instead and everything should be fine.
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >newbie unicode problem (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: NSMenuItem setKeyEquivalentModifierMask not working as expected
  • Next by Date: Re: Invalid value of the string instance variables
  • Previous by thread: Re: newbie unicode problem
  • Next by thread: Custom NSView positioning inside a scrollview
  • Index(es):
    • Date
    • Thread