creating a Unicode (UTF-8) file using open/write/close file

Dar Scott dsc at swcp.com
Fri Sep 26 19:04:00 EDT 2003


On Thursday, September 25, 2003, at 08:38 AM, Trevor DeVore wrote:

> I get a file that Flash MX reads without a problem.  BBEdit still 
> doesn't recognize it but I will mess around with adding the BOM to the 
> file and see if that helps.  Now I just need to find a way to get file 
> paths in unicode and I will have a unicode friendly application.

Try putting the BOM before the unicode and then convert to UTF-8.

(BTW, as you probably noticed, I got the bytes swapped in my earlier 
suggestion for creating the BOM.  The principle still might work.

function bom
   set the useUnicode to true
   return numToChar(abs(baseConvert("FEFF",16,10)))
end if

Or something like that.

Or simply use the three byte UTF-8 version.)

Dar Scott
unicode sophomore 




More information about the use-livecode mailing list