Re: newbie unicode problem
Re: newbie unicode problem
- Subject: Re: newbie unicode problem
- From: Magnus Strand <email@hidden>
- Date: Mon, 31 Jan 2005 10:35:46 +0100
Hi Daniel,
I haven't used Chinese characters myself, but here is one interesting
article:
http://developer.apple.com/documentation/Carbon/Conceptual/ATSUI_Concepts/atsui_chap1/chapter_1_section_1.html
Overview of ATSUI
Mac OS X is an international operating system. It fully supports Unicode
and comes with high-quality fonts capable of displaying many languages,
including Japanese and Chinese. Mac OS X supports input of nonphonetic
characters used by Chinese, Japanese, and Korean through the use of
input methods. Because Mac OS X uses Unicode for all onscreen text
display, ASTUI is at the heart of all text drawing in Mac OS X, as shown
in Figure 1-1. From the Mac OS X Human Interface Toolbox to the Menu
Manager, all Mac OS X text drawing at some point uses ATSUI to render
Unicode text. For example, the Finder uses ATSUI to display menu items
and create text editing fields:
Perhaps you can try with the ATSUI sample code.
Also are you using a font that has Chinese characters?
Regards,
Magnus
Daniel Child wrote:
Hi All.
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 have tried UTF-8 as the encoding for source files, but that didn't
work. (Naturally I set appropriate fonts for the textfields in the IB
window.) Actually, UTF16 seems like a more logical choice, but for
some reason, if I set source files to UTF16, I get a string of
warnings and errors about invalid characters when I build and run.
If someone could fill me on the basic steps (differences) for working
with Asian characters, I'd really appreciate it.
Thanks,
Daniel
_______________________________________________
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
--
Med vänliga hälsningar
Magnus Strand
System Developer, MSc
email@hidden
Direct: +46 40 601 57 16
Office: +46 40 601 57 00
Mobile: +46 704 20 57 16
Teknik i Media AB
Södra Förstadsgatan 2
SE-211 43 Malmö
Sweden
_______________________________________________
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