$Ov8.1.6-MacOS-10.13.6 :: Unicode UTF8 without BOM

Kelly Burgess kellyb at montana.com
Tue Nov 20 07:52:20 EST 2018

Hi Jean-Marc,

 >Do vFileObj.$writecharacter(kUniTypeUTF8,pTexte,kFalse) Returns vOK
> .. it is format UTF8 with BOM.

Yes, I see that, and it doesn't matter if $root.$prefs.$exportbom is kTrue or kFalse.  I get a 3-byte BOM at the top of the file.

I can avoid the BOM two ways: 

  Do vFileObj.$writecharacter(kUniTypeNativeCharacters,pTexte,kFalse) Returns vOK


  Do vFileObj.$writefile(chartoutf8(pTexte) Returns vOK

But I don't know if kUniTypeNativeCharacters is high-ascii-friendly or not, and I don't know if 2-byte utf8 values will be treated properly in files without BOMs.


More information about the omnisdev-en mailing list