|
-
Apr 25th, 2001, 06:13 PM
#1
Thread Starter
Fanatic Member
UNI code files
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),"")
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Apr 25th, 2001, 06:34 PM
#2
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
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Apr 25th, 2001, 06:56 PM
#3
Thread Starter
Fanatic Member
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.
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Apr 25th, 2001, 06:59 PM
#4
Your code doesn't work for me, but the code I provided worked fine. Input past End of File?
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Apr 25th, 2001, 07:24 PM
#5
Thread Starter
Fanatic Member
are you opening a unicode file?
here is one of the files
try opening it in wordpad
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Apr 27th, 2001, 09:47 PM
#6
Thread Starter
Fanatic Member
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
Kurt Simons
[I know I'm a hack but my clients don't!]
-
Apr 27th, 2001, 10:09 PM
#7
MSDN has some stuff about reading DBCS. Here is a some unicode...:
ABCかきくけこ
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|