• 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: Writing to file as UTF8 with BOM ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Writing to file as UTF8 with BOM ?
      • From: Sander Tekelenburg <email@hidden>
    • Re: Writing to file as UTF8 with BOM ?
      • From: "Mark J. Reed" <email@hidden>
    • Re: Writing to file as UTF8 with BOM ?
      • From: Emmanuel <email@hidden>
References: 
 >Re: Writing to file as UTF8 with BOM ? (From: Richard Rönnbäck <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: "Mark J. Reed" <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: Yvon Thoraval <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: "Mark J. Reed" <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: Yvon Thoraval <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: "Mark J. Reed" <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: Yvon Thoraval <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: Emmanuel <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: Yvon Thoraval <email@hidden>)
 >Re: Writing to file as UTF8 with BOM ? (From: Sander Tekelenburg <email@hidden>)

  • Prev by Date: Re: Writing to file as UTF8 with BOM ?
  • Next by Date: Re: Writing to file as UTF8 with BOM ?
  • Previous by thread: Re: Writing to file as UTF8 with BOM ?
  • Next by thread: Re: Writing to file as UTF8 with BOM ?
  • Index(es):
    • Date
    • Thread