Re: determining encoding on documents
Re: determining encoding on documents
- Subject: Re: determining encoding on documents
- From: Ben Dougall <email@hidden>
- Date: Mon, 21 Jul 2003 19:36:38 +0100
there's various tricks you can use.
part of mozilla has something that covers this:
<
http://lxr.mozilla.org/seamonkey/source/extensions/universalchardet/>
also have a look at the textedit app in the developer examples folder
on your drive to see how it handles it.
check for unicode bom's
html and xml usually have the encoding tag within the text itself
i think you have to end up using various ways, kind of aggregated /
fuzzy logic but the outcome will always remain an educated guess rather
than a fact.
and also give the user an option to over ride whatever your code ends
up with
On Monday, July 21, 2003, at 04:44 pm, Andreas Mayer wrote:
Am Montag, 21.07.03 um 09:26 Uhr schrieb Francisco Tolmasky:
When using loadDataRepresentation:(NSData *)data ofType:(NSString
*)aType how can we determine the encoding of the document? (For
example, UTF8 vs ASCII, etc.)?
Generally, you can't. You will need to know beforehand, what encoding
the document is in.
bye. Andreas.
_______________________________________________
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.
_______________________________________________
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.