• 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 04:45:40 +0200

Emmanuel wrote:
At 5:17 PM +0200 10/26/06, Yvon Thoraval wrote:
i thought UTF-8 could be guessed (successfully) from the content of the file isn't it ?

Yvon, I'm afraid that's not true with respect to UTF16 as an example shows at <http://www.satimage-software/en/unicode_and_applescript.html>.


And the BOM would provide a handy way to tell a UTF8 from an ASCII. It's rather unfortunate that the UTF8 BOM was not widely adopted, because reading a UTF8 as ASCII is a bad experience which happens rather frequently, I think.

that's the way the so called standards are going in "THE real lufe" )))

adding a bom is questionnable because, fundamentaly you are writing something to recognize the encoding in a file of unknown encoding....

in my opinion it would have been better writing that outsude of the file contents in the name of the file for ex part of the extension.

and standardize extension (as it is effectively) having a name made of ascii chars.

then you don't have even to open the file to know the encoding.

i'll read carefully the UTF-16 example at satimage because i've an app where i have to guess encoding.

it's amazing, it is a really simple app :

- it takes one html folder and write a menu to each file in such a way that, afterwards the user could navigate between those files in this folder.

simple task no ?

right except you face up directly with the "encoding" prob because all of the resulting file have to be of the same encoding, then you have to transcode each from it's "suppose to be" encoding to a unic one etc....

i had then to guess all sort of encoding in HTML files where their is a lot of pure ascii (the tags) the only way to get correct guessing is guessing the language used from a reference text encoded in various encoding, then retrieving the language of the text let you retrieve the encoding...

best,

Yvon

_______________________________________________
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>
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>)

  • Prev by Date: objectspecifiers question (very basic)
  • Next by Date: Re: Integration of Apple- and Tcl- script (Re: Applescript equivalent of $0 in shell script)
  • 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