• 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 text input in any encoding to unicode
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: converting text input in any encoding to unicode


  • Subject: Re: converting text input in any encoding to unicode
  • From: Ben Dougall <email@hidden>
  • Date: Mon, 28 Apr 2003 14:52:00 +0100

surely most (all?) text files not only contains which characters it contains but which encoding they're in? i'd have thought that was a standard requirement for text?

No, almost no text files have encoding information in them.

yes, i've realised that now from a couple of other replies.

No, there is no method to reliably find the encoding of a raw text file. Like I said before, generally, the only encodings that can be readily identified are ASCII and Unicode (and only with a Byte Order Mark).

realised that too. and bom's are completely optional in unicode text files. and even they're not conclusive. but very likely to correctly indicate unicode though.

but that's just for unicode in any case, which is just one out of many possible encodings.

i think i need to look at the textedit app example that's in devtools - see how that deals with finding out, or not finding out as the case may be, which encoding it's opening.

thanks.
_______________________________________________
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:
    • Re: converting text input in any encoding to unicode
      • From: Douglas Davidson <email@hidden>
References: 
 >Re: converting text input in any encoding to unicode (From: "Clark S. Cox III" <email@hidden>)

  • Prev by Date: Re: Hiding an NSTextField
  • Next by Date: classic mac os lists? please help.
  • Previous by thread: Re: converting text input in any encoding to unicode
  • Next by thread: Re: converting text input in any encoding to unicode
  • Index(es):
    • Date
    • Thread