Unicode problem

Ton Kuypers tkuypers at pandora.be
Wed Apr 20 09:28:40 EDT 2005


I've created a search & replace application to be used from within 
Adobe Indesign and it works perfectly:
A list with search words, a second list with replace words, some 
options and Indesign has got a supercharged S&R function with whole 
lists of words replaced by one click on a button.
To add words to the list, one can enter it in a "Search" textfield, the 
second part in the "replace" textfield. An add button adds it to the 
list.

But...

InDesign uses OpenType or double-byte fonts. These are unicode fonts.
When copying a word from a page in InDesign the clipboard contains te 
text with the special characters, but they are mixed (unicode and 
regular).

Problem:
- Paste in the entry field shows the correct text, moving it up to the 
list doesn't.
Solution:
- Loop through the characters in the entry field and set the unicode 
text or the regular text of the correct line in the list.
Question:
- Is there a better way to do this?

Problem 2:
I know what number the last line of the list is, so I put this number + 
1 into a var. Each new line will be entered into line varName.
- When the last line of the list is a unicode text, the next line is 
entered on the same line, it seams that the linenumber in the var 
doesn't have any effect anymore.
I've tried to add a CR after that line, but no luck :-(

Anyone any solutions or remarks?


Regards,


Ton Kuypers
Digital Media Partners bvba
Tel. +32 (0)477 / 739 530
Fax +32 (0)14 / 71 03 04
http://www.dmp-int.com



More information about the use-livecode mailing list