unicodeText problem with Japanese

Nicolas Cueto niconiko at gmail.com
Thu Mar 22 01:55:13 EDT 2007


In trying to import Japanese text into a field using:

  set the unicodeText of field "fKanji" to url "binfile:yek/AAA.txt"

I am encountering a compound problem.

The letters themselves of the Japanese text appear, 
but not the end of line markers, i.e., it's all one long 
line with cr's replaced by a blank -- which, using
charToNumber seems to be the cr marker. (In
addition, an unrecognizable character appears
in the very first character position of the field, but
that's a problem I can resolve with the "delete" 
function.)

I tried cr and lf with my Japanese text editor(s), as
well as different unicode encodings, but neither 
end-of-line marker is handled properly by the 
unicodeText function. 

So, as a workaround solution, I first used a text editor 
to substitute all cr's (or lr's) in the original text file with 
a unique Japanese character. Then, after importing 
that modified text with the unicodeText function, I used 
the "replace" function to replace all instances of that 
unique character with cr.

This almost worked, i.e. the text was divided into lines.
Only, one of the Japanese characters in the original text 
disappears after the "replace with", and, in its stead,
a blank line appear.

I would try a workaround for that, but there might be
other Japanese characters that are likewise deleted
or altered.

Maybe this is a bug?

--
Nicolas Cueto



More information about the use-livecode mailing list