• 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: Multiple Languages Font Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple Languages Font Menu


  • Subject: Re: Multiple Languages Font Menu
  • From: Rainer Brockerhoff <email@hidden>
  • Date: Tue, 27 Nov 2001 18:35:34 -0200

Date: Tue, 27 Nov 2001 15:10:01 +0800
From: Johnny CN Lee <email@hidden>

I want to create a NSComboBox which contains font names for the user to
select. I use the following code to do it:
...
fontString = [NSString stringWithCString:&itemString[1]];
...
All fonts with English names are displayed correctly, but not for Japanese
font names. All Japanese characters are displayed as Latin characters.

Have I done anything wrong?

Yes :-).

The error is in the line I left in. stringWithCString means MacRoman encoding, which encodes most western-language accented characters, but nothing in Japanese.

Try:
fontString = [NSString stringWithUTF8String:&itemString[1]];
that might do it...

--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"Originality is the art of concealing your sources."
http://www.brockerhoff.net/ (updated Oct. 2001)


  • Prev by Date: Re: Toolbar Icons area 32x32
  • Next by Date: How to communicate with BSD pipes?
  • Previous by thread: Multiple Languages Font Menu
  • Next by thread: Re: Multiple Languages Font Menu
  • Index(es):
    • Date
    • Thread