how do I open a unicode "text" file
this cannot be correct
---------------------------------------
open "c:\temp" for binary as #1
B() = input(lof(1),1)
close #1
MyString = replace(str(b()),chr(0),"")
Printable View
how do I open a unicode "text" file
this cannot be correct
---------------------------------------
open "c:\temp" for binary as #1
B() = input(lof(1),1)
close #1
MyString = replace(str(b()),chr(0),"")
try...
Code:Dim FileNum as integer
Dim strMyString as string
FileNum=FreeFile()
Open "C:\myfile.txt" for Input as FileNum
strMyString=Input(Lof(FileNum),FileNum)
Close FileNum
msgbox strMyString
this does not work
I get
past end of file or something
I am currently doing it like I showed in my post
there must be a simple way to open a uni-code file and convert it into a string.
Your code doesn't work for me, but the code I provided worked fine. Input past End of File?
are you opening a unicode file?
here is one of the files
try opening it in wordpad
Anybody give it a try?
my first example didn't work because I didn't declare b() as a byte
dim b() as byte
open "c:\temp" for binary as #1
b() = input(lof(1),1)
close #1
MSDN has some stuff about reading DBCS. Here is a some unicode...:
ABCかきくけこ