• 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 ASCII to UTF-8?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting ASCII to UTF-8?


  • Subject: Re: Converting ASCII to UTF-8?
  • From: Shawn Erickson <email@hidden>
  • Date: Mon, 29 Mar 2004 16:57:20 -0800

On Mar 29, 2004, at 1:57 PM, Huyler, Christopher M wrote:

If I read an ASCII string in from a file and store it in an NSString,
how could I convert it to UTF-8 so it will display properly?

This question doesn't make sense to me... UTF-8 is designed to be a super set of ASCII and regardless UTF-xx is only an encoding, it doesn't affect display. You just need to read things in correctly using the correct encoding (an encoding matching the source file).

NSString and things that accept those will know what to do to get things displayed correctly (you shouldn't generally ever need to care what the internal encoding of NSString is).

So I guess what isn't displaying correctly?

-Shawn
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Tao of string encodings (Re: Converting ASCII to UTF-8?)
      • From: Jim Rankin <email@hidden>
References: 
 >Converting ASCII to UTF-8? (From: "Huyler, Christopher M" <email@hidden>)

  • Prev by Date: Re: Converting ASCII to UTF-8?
  • Next by Date: Re: SIGIO and AppKit main loop
  • Previous by thread: Re: Converting ASCII to UTF-8?
  • Next by thread: Tao of string encodings (Re: Converting ASCII to UTF-8?)
  • Index(es):
    • Date
    • Thread