• 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] Cocoa UI and UTF-8
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] Cocoa UI and UTF-8


  • Subject: Re: [newbie] Cocoa UI and UTF-8
  • From: Yvon Thoraval <email@hidden>
  • Date: Tue, 12 Jul 2005 11:54:07 +0200


Le 12 juil. 05 à 09:16, John Stiles a écrit :

Cocoa APIs that take strings as input all take NSStrings, which aren't tied to any one encoding (MacRoman or otherwise).

i don't understand what you've said about "NSStrings [] aren't tied to any one encoding".


i know that if i use in an NSRunALertPanel a string written like that :
@"Blablablah with accentuated characters éèùà"
if the file ("MyDocument.m") is encoded in macOS Roman ==> NO prob
if the same file is encoded in UTF-8  and i use :

[NSString stringWithUTF8String:"Blablablah with accentuated characters éèùà"]

no prob also, THEN, i think their is a default encoding "MacOS Roman" for the UI

** now for output **

suppose now the reverse, i'm reading an NSTextField, from my experience again, default encoding is MacOS Roman

then if i want to use the stringValue of an NSTextField into an xml document (better having those in utf-8) i do have to translate that from macos roman to utf-8

in such a case how to translate from Macos roman to utf-8 ?



Yvon


_______________________________________________ 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
  • Follow-Ups:
    • Re: [newbie] Cocoa UI and UTF-8
      • From: j o a r <email@hidden>
References: 
 >[newbie] Cocoa UI and UTF-8 (From: Yvon Thoraval <email@hidden>)
 >Re: [newbie] Cocoa UI and UTF-8 (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Can you provide some code advice for a newbie please?
  • Next by Date: Re: "untitled" vs "Untitled" (code correction)
  • Previous by thread: Re: [newbie] Cocoa UI and UTF-8
  • Next by thread: Re: [newbie] Cocoa UI and UTF-8
  • Index(es):
    • Date
    • Thread