Jump to content

Recommended Posts

Posted

Servant

it does work as expected...

$filename = @ScriptDir & "\chinesestring"
$string = "北京市 - 邓小平"    ; Beijing - Deng Xiaoping
$f = FileOpen($filename & "_unicode_.txt", 2+64)    ; unicode
$f2 = FileOpen($filename & "_utf8BOM_.txt", 2+128)    ; utf8 with BOM
$f3 = FileOpen($filename & "_utf8plain_.txt", 2+256)    ; utf8 no BOM
FileWriteLine($f, $string)
FileWriteLine($f2, $string)
FileWriteLine($f3, $string)

FileClose($f)
FileClose($f2)
FileClose($f3)
 

 

Result are 3 files as attached.

chinesestring_unicode_.txt

chinesestring_utf8BOM_.txt

chinesestring_utf8plain_.txt

I am just a hobby programmer, and nothing great to publish right now.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...