comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to Read Chinese file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: How to Read Chinese file [message #66426] Mon, 11 May 2009 06:55
xiemin198403 is currently offline  xiemin198403
Messages: 6
Registered: July 2008
Junior Member
Thank you!I have settle it!
Thank you very much!
Re: How to Read Chinese file [message #66438 is a reply to message #66426] Mon, 11 May 2009 00:51 Go to previous message
Wout De Nolf is currently offline  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?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Curve Fitting
Next Topic: DIALOG_PICKFILE question

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:05:18 PDT 2025

Total time taken to generate the page: 0.00514 seconds