• 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: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)


  • Subject: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • From: "Clark S. Cox III" <email@hidden>
  • Date: Tue, 03 Sep 2002 11:04:24 -0400

On 09/02/2002 23:57, "Allan Odgaard" <email@hidden> wrote:

> On tirsdag, sep 3, 2002, at 01:30 Europe/Copenhagen, Charles Srstka
> wrote:
>
>> UTF8String is probably the best way to go - to the best of my
>> knowledge UTF8 is the same as plain ASCII encoding whenever special
>> characters aren't involved [...]
>
> Yes, every 7 bit character keep its normal encoding.
>
> However most of Europe make heavy use of accented letters and other
> stuff which in iso-8859-1 is placed in the range of 160-256.
>
> The entire BSD layer in OS X is also geared toward iso-8859-1,

Not really, considering that all unix filepaths on OSX are UTF-8.

> not to
> mention that this has been the de-facto standard on all other platforms
> than Mac for the last 10-20 years, and I also believe it to be promoted
> somewhere as the internet standard (whatever that means).

Yes, most internet-related programs assume 8859 as the default, however
it is always best to explicitly give an encoding.

> So whenever I need a "char *" then I always go for iso-8859-1.

Bad idea, very bad idea. What happens if you get a filepath from the OS
(which will be UTF-8), and assume that it is ISO8859-1. This will work
perfectly, as long as the path doesn't contain any characters outside of
7-bit ASCII (since, as was pointed out, ASCII, 8859-1, UTF-8 and many other
encodings overlap perfectly in the range of 0-127), however if the path
contains even a single non-English character (any accents, cyrillic
characters, arabic characters, japanese characters, whatever) it will fail
miserable.



--
Clark S. Cox III
_______________________________________________
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.

References: 
 >iso-8859-1 over UTF8 (was: Re: cString deprecated!) (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: AlertPanel after loading the app
  • Next by Date: NSHost and local IP Addresses (reverse lookup problems)
  • Previous by thread: Re: iso-8859-1 over UTF8 (was: Re: cString deprecated!)
  • Next by thread: Re: cString deprecated!
  • Index(es):
    • Date
    • Thread