Problem with Latin 1 (I think)

Malte Brill revolution at derbrill.de
Mon Feb 6 04:51:37 EST 2012


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 string
-- @param UTF-8 encoded string
-- @return decoded content
*/
function decodeUtf8 pContents
    local tContents
    put unidecode(uniencode(pContents,"UTF8"),"english") into tContents
    if chartonum(the last char of tContents)=10 then delete the last char of tContents
    return tContents
end decodeUtf8






More information about the use-livecode mailing list