Unicode for cross-platform use

Kjetil Rå Hauge k.r.hauge at east.uio.no
Thu Nov 18 12:56:34 EST 2004


I am struggling a bit with making Unicode work both under Mac OS X and Windows.

First of all, there seems to be no automatic 
conversion of byte order (like those that word 
processors have?), so to use Mac Unicode files on 
the Windows build of my application, they have to 
be bitswapped through BBEdit, Wordpad or some 
other way. If somebody could suggest a sniffing 
and conversion routine, I would be very happy, 
but I could still live with this problem.

Worse, though, is a problem with display under 
Windows. I can display a file in a field with

  put  URL myPath into stuff
  set the unicodetext of field myField to stuff

I can also import a large file (a dictionary) and 
do searches in it with lineoffset(). On the Mac, 
I can display results in a field:

set the unicodetext of field foundStuff to line 
lineoffset(searchString, myDictionary) of 
myDictionary

(or similar code collecting all hits in a 
variable). Under Windows, however, the field 
turns into Chinese (or CJK at least) characters. 
The hits are probably correct, judging by the 
length of the field text compared with what I get 
on the Mac. All fields are set to Lucida Grande 
on the Mac, and this seems to turn into Arial 
Unicode in the Windows build.

Hints and suggestions are very, very welcome. I am using Rev 2.1.
-- 
---
Kjetil Rå Hauge, U. of Oslo, PO Box 1030 Blindern, N-0315 Oslo, Norway
Tel. +47/22856710, fax +47/22854140


More information about the use-livecode mailing list