Line Breaks Dropped on Importing Unicode Text
Sivakatirswami
katir at hindu.org
Fri Sep 4 01:39:57 EDT 2009
I have some UTF-16 unicode raw text. If I import this into Pages, it
displays the font correctly and also the line breaks between paragraphs
correctly
But if I use this function:
on mouseUp
answer file "Choose a unicode file to read in."
if it is empty then exit mouseUp
put "binfile:" & it into urlName
replace numtochar(13) with numtochar(10) in urlName
set the unicodeText of fld "display" to url urlName
end mouseUp
the line breaks are not appearing in the field in revolution.
Also if I try to analyze what chars are there, where the line break
should be, by selecting across a missing line break and then use this test:
on mouseUp
set the useUnicode to true
if the selection is empty then
answer "No Selection" with "ok"
end if
put the selection into tUnicode
put tUnicode
repeat for each char x in tUnicode
put chartonum(x) & cr after tOutput
end repeat
put tOutput # returns empty
end mouseUp
I get nothing in the msg box. If I switch from Tamil Inaimathi (Mac
unicode font) to Anjal Chittu unicode, The Tamil displays correctly and
now I can clearly see a two byte block
space+square-box-symbol (somewhat transparent) where the line breaks
should be. But it still returns empty on an empty to determine what the
bytes are....
How do we deal with/import correctly, line breaks in unicode text in
Revolution?
I plan to create an editing environment as a revlet for online work...
and unicode will be imported and exported freely for later use in
InDesign. Obviously CRLF (or whatever it is in Unicode) needs to be
preserved.
Thanks!
Sivakatirswami
"completely Unicode newbie"
More information about the use-livecode
mailing list