Re: Writing to file as UTF8 with BOM ?
Re: Writing to file as UTF8 with BOM ?
- Subject: Re: Writing to file as UTF8 with BOM ?
- From: Yvon Thoraval <email@hidden>
- Date: Fri, 27 Oct 2006 10:50:31 +0200
Sander Tekelenburg wrote:
in the name of the file for ex part of the extension.
File name extensions aren't appropriate for this sort of thing.
yes i agree with your point.
[...] i've an app where i have to guess encoding [of the input -st]
That sucks. Some apps can guess the encoding for you, so maybe one of the
gods in this list can even tell you how to do that from within AS (I'm sure
it will require some do shell script call). But it would still be a guess.
IMO the only way to be sure is for whoever gives you the file to tell you
what encoding applies -- assuming they even know...
for the time being y've done that using regexp first : i wipe out all
html tags.
aferwards i look if it is the simplest case, that's to say ascci, a
more advance case : UTF-8
up to here everything works very well.
then i look for all the iso and cp dialects using enca (by do shell
script) where i do have coples of (encoding, language) text files
(obviously i don't have all the encodings for all the languages of the
world))) resulting in the most probable cople in my coples set.
when enca say "not found" y assume it is "iso-8859-1" and log an error
message.
i'de like to go further working with UTF-16 to enable working with asian
"character" set (I'm an anciant chinese reader).
best,
Yvon
ps, is applescript utf-16-able ???
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/mailman//archives/applescript-users
This email sent to email@hidden