I’m having trouble with saving Unicode characters to a file. For example, the 
following code saves a file to disk:

C_TEXT($tText;$tFilepath)

$tText:=“©” //Copyright symbol
$tFilepath:=System folder(Desktop)+"test.txt"
TEXT TO DOCUMENT($tFilepath;$tText;UTF8 text without length)

When I open the file again, it only contains a “?” character.

If I use:

TEXT TO DOCUMENT($tFilepath;$tText)

it saves correctly, but then the file has a BOM character at the beginning 
which is wreaking havoc with other systems that aren’t expecting it.

Does anyone know what I should be doing here? Thanks.

--
Cannon.Smith
Synergy Farm Solutions Inc.
Hill Spring, AB Canada
403-626-3236
<[email protected]>
<www.synergyfarmsolutions.com>


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to