Code: Select all
dim s as string
dim w as wstring * 16
s = "d:\asdf.txt"
w = "asdf"
open s for binary as #1
put #1,, w
close #1
w = ""
open s for binary as #1
get #1,, w
close #1
s = ""
s = w
print s
print len(s)
sleep
I ran my test in Windows, so for a unicode file name i will have to resort to "_wfopen" from the C runtime or make use of the windows API (createfile ...), i think.
How about Linux? I remember having read somewhere that in Linux _wfopen isn´t available, but "fopen" would accept UTF-8 encoded file names instead. Is this true?
JK