Does anyone have a code snippet for converting accented characters to lower (<128) ASCII equivalents? Example: ë to e OR À to A and so on?
Any help is much appreciated
Converting accented characters to ASCII 128
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Wed Aug 26, 2009 7:42 pm
- Location: Randolph, MA USA
- Contact:
Converting accented characters to ASCII 128
Paul Dupuis
Researchware, Inc.
Researchware, Inc.
-
- VIP Livecode Opensource Backer
- Posts: 3999
- Joined: Sun Jan 07, 2007 9:12 pm
- Location: Bochum, Germany
Paul,
welcome to the forum.
I dont have such a function handy, it would be easy to do it yourself.
make a field and a button. In the button you put
Now you group your high ASCII characters like
welcome to the forum.
I dont have such a function handy, it would be easy to do it yourself.
make a field and a button. In the button you put
Code: Select all
on mouseUp
repeat with i = 128 to 255
put numtochar(i) & "," after field 1
end repeat
delete last char of field 1 -- comma
end mouseUp
Code: Select all
Ä,Ã…,À,Ã,Â,Ã
-
- VIP Livecode Opensource Backer
- Posts: 135
- Joined: Wed Aug 26, 2009 7:42 pm
- Location: Randolph, MA USA
- Contact:
Thanks. That's what I came up with after a couple Google searches for algorithms to do thsi and found most all were table lookups. He're the function I wrote if it helps any one else:
Code: Select all
function toASCII128 pText
local tAccents, tASCII, tSpecials, tText, tChar
put "ÀÃ
Paul Dupuis
Researchware, Inc.
Researchware, Inc.