Unicode problem with Simplified Chinese - InDesign unhappy with binfile
Dar Scott
dsc at swcp.com
Mon Sep 29 11:39:00 EDT 2003
On Monday, September 29, 2003, at 08:39 AM, Callum Brines wrote:
> Thanks Dar. I tried binfile but unfortunately InDesign will not import
> the resulting file with error "There is no filter for the requested
> operation".
I'm guessing that it did not like the line-end.
Two ideas based on my assumption that it wants Mac line ends, that is,
ASCII CRs:
1 If InDesign will take UTF-8, then convert your UTF-16 to UTF-8 and
then save as text (file:).
2 Change the LF to an ASCII CR yourself in the Simplified Chinese.
The BG coding has both bytes with the high bit set, so there should not
be a clash. Look at the 'replace' command in the Transcript
Dictionary. Simplified Chinese characters and ASCII characters are
normally mixed and the uniEncode() handles that. The final UTF-16
result still needs to be saved as binary (binfile:). (This method has
to be enhanced to become multiplatform.)
(I don't think replacing the UTF-16 two-byte LF with a two-byte CR can
be done with a simple replace.)
> My worry is that over much longer stretches of text than the small
> sample I've been working with till now, other Chinese characters may
> be scrambled by the uniEncode function which would cause me serious
> problems. If I find a workaround for the problem I'll let you know.
I still think this is a problem with 0A bytes being converted to 0D.
If that is the case, you will see others.
When I tinkered with small strings using the codes you mentioned using
uniEncode and uniDecode, the results looked OK to me. They acted as
inverses and the codes looked right from the symbol tables at
<http://www.khngai.com/chinese/charmap/>.
You could try inserting other Simplified Chinese characters with 0A in
the second byte and see if those get converted, too.
Dar Scott
uniCode Student
****************************************
Dar Scott Consulting
http://www.swcp.com/dsc/
Programming Services
****************************************
More information about the use-livecode
mailing list