Passing UTF-8 through variables

Sivakatirswami katir at hindu.org
Mon Feb 28 14:59:13 EST 2005


Well, it turns out there is nothing wrong with the original file at 
all... duh! I tried the "old fashioned way" selected/copied the raw 
text from BBEdit, pasted into a text box in InDesign, select all text 
and change to MinionD. Yahoo!   it works... all these "diacriticals" 
are just 8-bit chars in the high ascii range (128-255) for font 
MinionD...  ergo, nothing wrong with the file at all.

But, the way of saving the file in BBEdit is crucial:  we set the file 
type in BBEdit to save as

Unix- Unicode- UTF-8

Then the import into InDesign with XML tags mapped to character styles 
worked fine. The problem seems to have been that the file was being 
saved in BBEdit as a MacIntosh file. If we set it to 
mac-unicode-iso-8859-1   bbedit would give an unmappable char msg. If 
we set it to save as mac-not-unicode-iso-8859-1... all problems in 
BBEdit woudl go away, but it would not import the characters correctly 
as xml in Indesign. Only Unix- Unicode- UTF-8 worked in both 
environments.

Frankly I feel like a doctor talking about "eczema" for which he knows 
not the cause or the cure, but pretends to his patient have some great 
knowledge via the use of fancy labels for observable phenomena.  When 
in fact the only thing he *really* knows is "You have a skin problem." 
"Right, I knew that before I came to see you..."

In this case we are one step further... we know not the cause but we 
did find a cure, though the mode of operation of that is still unknown, 
but all we really know is "its an encoding thing.." (smile)

Dar, your tips did put me onto it though, thanks.

Sivakatirswami




On Feb 27, 2005, at 6:19 PM, Dar Scott wrote:

>
> On Feb 27, 2005, at 7:11 PM, Sivakatirswami wrote:
>
>> I am *way* out of my depth here..
>
> Does this fix the file?
>
> on mouseUp
>   put "/Volumes/Varuna/Books/LWS Pocketbook/lws_pocket_book utf-8.xml" 
> into oldFile
>   put "/Volumes/Varuna/Books/LWS Pocketbook/test utf-8.xml" into 
> newFile
>   put URL ("binfile:" & oldFile) into oldData
>   put unidecode(uniencode(oldData), "UTF8") into newData
>   put newData into URL ("binfile:" & newFile)
> end mouseUp
>
> I just typed it up off the top of my head, so you may have to fiddle 
> with it.
>
> If it works, that should give you a clue as to what to do in output in 
> the index app.
>
> Dar
>
> -- 
> **********************************************
>     DSC (Dar Scott Consulting & Dar's Lab)
>     http://www.swcp.com/dsc/
>     Programming Services and Software
> **********************************************
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list