• 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: Thu, 26 Oct 2006 17:17:03 +0200

Mark J. Reed wrote:

UTF-8, on the other hand, is, as the name implies, an 8-bit encoding. It's defined in terms of bytes, not 16-bit words, so the order of those bytes is fixed. You don't need a BOM to distinguish between some hypothetical *UTF-8LE and *UTF-8BE encodings. But it still makes sense to put a BOM in a UTF-8 file to identify that file as not only Unicode text, but specifically as UTF-8 text. In fact, the UTF-8 version of the BOM, since it's 3 bytes instead of 2, is 256 times less likely than the UTF-16 BOM to appear randomly in data. It's therefore even closer to a guarantee that the file has UTF-8 text instead of something else.
i thought UTF-8 could be guessed (successfully) from the content of the file isn't it ?
Or the app writer did add BOM for UTF-8 for facility reason, having that firsts three bytes avoid the usefullness of guessing UTF-8.


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: Emmanuel <email@hidden>
    • Re: Writing to file as UTF8 with BOM ?
      • From: Christopher Nebel <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>)

  • Prev by Date: Re: How can I open attachment in Mail ?
  • Next by Date: Re: How can I open attachment in Mail ?
  • 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