|
Re: How to Read Chinese file [message #66438 is a reply to message #66426] |
Mon, 11 May 2009 00:51  |
Wout De Nolf
Messages: 194 Registered: October 2008
|
Senior Member |
|
|
On Sun, 10 May 2009 08:32:32 -0700 (PDT), xiemin198403@163.com wrote:
> Dear:
> I want to read a Chinese text file,the content is like this (????,????
> ?? ?????? ??????,????).
> I want to read ???? to variable a, ?????? ?????? ?????? to variable b, ??
> ?? to variable c.
> That is to say:A comma corresponds to a variable.
> How to do it!
>
> xiaoxie
So you have a UTF-8 encoded file (I don't understand all this encoding
things, but it seems 3-bytes for the chinese characters and 1 byte for
the bracktes and the comma ).
I think the only way is to read the file unformatted (use readu).
Afterwards you can do this to extract the three variables:
str="(??,?? ? ??? ???,??)" ; you have to readu it from your file
str=strsplit(str,"(,",/extract)
A=str[0]
B=str[1]
C=str[2]
Does this help?
|
|
|