Rev fails to recognize Chinese

Friedrich F. Grohmann shedrup at ms9.hinet.net
Wed Jan 28 10:25:45 EST 2004


My gratitude for all contributions dealing with the problem I mentioned.

Tom hinted to "pasting differences with plain english text files". Well, 
the text I pasted was copied from a Nisus file which is basically a text 
file, as far as I understand. I checked with English text copied from 
Nisus and Rev has no difficulty in finding things therein.

Andre suggested "reading from file". Unfortunately, the text thus read 
still cannot be searched.

Ron wondered whether I had set the text of the fld to unicode and/or set 
the textfont of the field before pasting. Regarding the font, I did 
specify it by way of object inspector > text formatting. However, I had 
failed to pay attention to explicitly stating "Chinese" and tried now to 
remedy the situation. The result is quite unexpected: 

I created two fields, "oldText" with "Apple LiSung Light" and "newText" 
with "Apple LiSung Light,Chinese". Chinese text pasted from Nisus into 
"oldText" displays properly. But when I executed 

     put fld "oldText" into fld "newText"

via the message box, the transferred text displayed as *Korean* garbage! 
How the specification "Chinese" leads to this mixup is beyond me. (Out of 
curiosity I tested this command with text directly typed into field 
"oldText". It displays properly in field "newText" and both fields are 
searchable. Very nice, but doesn't solve my problem.)

So finally the suggestion to take care of uniEncode. Dealing with the 
just described test scenario, the command

     put uniEncode(fld "oldText","Chinese") into fld "newText"

works wonders! The Chinese is not only retained but can also be searched. 
In principle, this marvelous trick seems to solve my problem and once 
more I would like to thank everyone who shared his suggestions.

The thing is that a new problem raises its head -the original text 
contains one actually quite common character (yang3, "to rear") which not 
only disappears in fld "newText" but leads to a line break. What is 
happening here? 

Fritz








More information about the use-livecode mailing list