Unicode with answer file and manipulating text fields
Trevor DeVore
lists at mangomultimedia.com
Thu Sep 18 07:37:01 EDT 2003
Hi,
I am trying to implement double-byte support for an application I am
updating for a customer. I have some things working with Unicode but
the majority I have not been able to figure out yet. I'm hoping
someone can shed some light on this for me.
Setup:
Mac OS X.2.6
Input Menu under System Preferences >> International is set to U.S. and
Japanese.
Entering Text:
I have two types of fields which display text. The first lets the user
enter text using the keyboard. If I switch between English and
Japanese this works fine.
The second type of field displays file names and paths of files that
the user selects from their hard drive. It is seperated into two
columns. When the user selects a file the name of the file is put in
column 1 and the path to the file is put into column 2. The user
creates a list of files in this field. The user can also edit the name
of the file in column 1. Editing the file name is not a problem.
Problem:
The following code will display a path which looks like
"/Users/tdevore/desktop/JAPANESE_CHARACTERS" on the first line of the
field but will not work for multiple lines. It places everything on
the first line or causes Rev to hang. The code works fine without
unicode text. tNextLine is the line that should be inserted into.
set textFont of line tNextLine of field "movieList" to ",Japanese"
put uniEncode (tNewMovieName & tab & pMoviePath, "Japanese") into
tNewMovieName
set unicodeText of line tNextLine of field "movieList" to tNewMovieName
I tried the above code using "utf8" rather than "Japanese" but japanese
characters did not display correctly.
Also, how do I get the proper encoding to use for a string which I get
from answer file? My system is English but the string has Japanese
encoded characters and it appears it has to have the language setting
as Japanese when encoded?
Anyone have any ideas?
--
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com
More information about the use-livecode
mailing list