RTF and Unicode

Joel Rees joel at alpsgiken.gr.jp
Tue Jul 22 23:27:01 EDT 2003


> On Utorak, Jul 22, 2003, at 20:53 Europe/Belgrade, Tuviah Snyder wrote:
> >>
> > RTF does support unicode text, but the unicode text is encoded a  
> > multibyte
> > and tagged with the appropriate language so other RTF readers can read  
> > it.
> > You should not need to encode the RTF file using UTF-8. Should be  
> > enough to
> > simply put the rtftext of field "suchandsuch" into url "blah.rtf"
> 
> 
> That's what I was hoping for, but alas this does NOT happen.  Saving a  
> UTF-8 encoded field with Cyrillic text as an rtf file produces garbage  
> that looks like this if you open it in TextEdit:
> 
> $Bc`FE%&c`Fd/oc`FD%3(Ba je, $Bc`HE*d(B€“$B%[%%(Be$Bc`Fd2'(B $Bc`Fd/q(Ba$Bc`FD%3(Beo $Bc`HE*d(B€“$Bci!"(Be $Bc`FD!&(Bo $Bc`Fd0-c`HE2d(B€”$B%F%*c`FP%%c`Fd/oc`HEKc`Fd2&c`HE'Bc`HE-B(B $Bc`Fd/o(B  
> $Bc`HE*d(B€“$Bci!"(Be$Bc`FD%3c`HE1(Bo$Bc`FD!&c`HE2d(B€“$BchAF(Bo $Bc`HE*d(B€”$B%F.d(B€“$Bci!"(Ba$Bc`HE(d(B€“$B%[%%c`Fd/o(B...

(which will likely be further confused by the fact that my mail client
is going to try to say this is shift-JIS ...)

You might try specifying the encoding when opening with text edit. I
make no promises, but I find that I do often have to specify the
encoding when working with non-latin text.

> or like this if you open it in BBEdit:
> 
> {\rtf\mac  
> {\colortbl\red0\green0\blue0;\red0\green0\blue128;\red0\green128\blue0;\ 
> red0\green128\blue128;\red128\green0\blue0;\red128\green0\blue128;\red12 
> 8\green128\blue0;\red192\green192\blue192;\red128\green128\
> 
> Looks very interesting, but it's not exactly Cyrillic... :)

You're right. That is not cyrillic. It's a color table. The part that
would be cyrillic would be further down, I suspect.

And definitely try specifying the encoding when opening the file with
BBEdit.

-- 
Joel Rees, programmer, Kansai Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp




More information about the use-livecode mailing list