Re: Problem with Latin 1 (I think)

2012-02-06 Thread Ken Ray
On Feb 6, 2012, at 6:21 AM, Ken Corey wrote > As I understand it, you've got to get the text from UTF8 into the internal > representation of a string. Then, for the field to understand it and display > it properly, you must put the string into the unicodeText of it. Right - the hard part is f

Re: Problem with Latin 1 (I think)

2012-02-06 Thread J. Landman Gay
On 2/6/12 12:15 PM, Bob Sneidar wrote: Unless I am misunderstanding you, uniEncode would appear to take single byte characters and convert them to double byte. I am thinking the reason to convert it all to multibyte and back again is because mixed byte text would confuse uniDecode, as it assumes

Re: Problem with Latin 1 (I think)

2012-02-06 Thread Bob Sneidar
This bit in the Dictionary might be somewhat misleading then: "Use the uniEncode function to convert single-byte characters to double-byte characters." Also, this bit of code: put "1234" into theTest put length(theTest) into theSingleCount put uniEncode(theTest, "English") into theUniTest put le

Re: Problem with Latin 1 (I think)

2012-02-06 Thread J. Landman Gay
On 2/6/12 11:32 AM, Bob Sneidar wrote: The multibyte characters are like Chinese and Euro currency, the single byte characters are like US dollars. Uniencode is the bank next door and Unidecode is the first bank. Uniencode converts ALL the characters to multibyte, and Unidecode converts it all b

Re: Problem with Latin 1 (I think)

2012-02-06 Thread Bob Sneidar
Let's say you were at a bank trying to convert all your currency to US dollars (although why you would do that these days is beyond me). You have some Chinese currency and some Euro currency. The bank you are at refuses to convert Chinese currency at all, but will convert Euros. The bank next do

Re: Problem with Latin 1 (I think)

2012-02-06 Thread Ben Rubinstein
On 06/02/2012 16:21, Geoff Canyon Rev wrote: Okay, so I'm at a loss. This worked, but...why? I first have to *encode* it, then *decode* it? If it's already UTF8, why am I encoding it as UTF8? is it that some of it is encoded, and the encoding function is encoding the rest, but knows not to encod

Re: Problem with Latin 1 (I think)

2012-02-06 Thread Geoff Canyon Rev
Okay, so I'm at a loss. This worked, but...why? I first have to *encode* it, then *decode* it? If it's already UTF8, why am I encoding it as UTF8? is it that some of it is encoded, and the encoding function is encoding the rest, but knows not to encode the characters that are already encoded? If t

Re: Problem with Latin 1 (I think)

2012-02-06 Thread Ken Corey
I expect you're running up against UTF8 characters in your html (just like the thread "Japanese characters in HTML result"). What's the encoding of the page? Here's what I wrote in that thread. Try it and see if it solves the problem: On 04/02/2012 05:14, Bob Sneidar wrote: > So the trick

Re: Problem with Latin 1 (I think)

2012-02-06 Thread Malte Brill
Hey Geoff, that would be UTF8... Use decodeUTF8 to decode. Hth, Malte /* -- encodes a string to UTF-8 -- @param content to encode -- @return encoded content */ function encodeUtf8 pContents return unidecode(uniencode(pContents, "english"), "UTF8") end encodeUtf8 /* -- decodes an UTF-8 str

Problem with Latin 1 (I think)

2012-02-06 Thread Geoff Canyon Rev
I'm retrieving a url and parsing the HTML. If I view the URL in Safari (all of this on a mac) there are places where safari shows "isn’t" but livecode shows "isn‚Äôt" I'm using 5.0.2, and isotomac doesn't seem to fix this. Any suggestions? thx -- gc ___