german umlaute

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

german umlaute

Post by fredigertsch »

Is it realiy true? does runrev not work with german umlauts? I have in a Database german words as "Schriftart wählen" etc. When I read this records in a runrev query I get "Schriftart wählen". Any help? Thank you.

Fredi
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: german umlaute

Post by dunbarx »

I am probably out of my depth, but ASCII 159 and unicode 00FC both produce this character.

Craig Newman
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: german umlaute

Post by Klaus »

Hi Fred,

what encoding is being used in your database?
I guess that internally all text will be treated a ISO, so on the Mac you will see this inconvenience!

Try to convert your text to iso
-> mactosio("your text here") BEFORE writing to the database and convert back
-> isotomac(...) after you retrieved data from the database and BEFORE you put this into any field.

Something like this:

Code: Select all

...
if the platform = "MacOS" then
  put mactoiso(...)...
end if
...
Best

Klaus




Best

Klaus
BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: german umlaute

Post by BvG »

looks more like utf8 to me. try these two functions at the appropriate places:

Code: Select all

function createUtf8Text theText
   return unidecode(uniencode(theText),"utf8")
end createUtf8Text

function getRevTextFromUTF8 theText
   return unidecode(uniencode(theText,"utf8"))
end getRevTextFromUTF8
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

Re: german umlaute

Post by fredigertsch »

Thank you to all, i will try and report it.
fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

Re: german umlaute

Post by fredigertsch »

Hi BvG

Your function does work:

function getRevTextFromUTF8 theText
return unidecode(uniencode(theText,"utf8"))
end getRevTextFromUTF8

but only without the 8 in the function-name.

THANK YOU
fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

Re: german umlaute

Post by fredigertsch »

Hi there
Now I have a new problem like this - i work now with mac ;-)
When I save a string like this "Wir gehen in der Küche Brot holen" in a sqllite database, then the string is after the umlaut ü broken. In the database is only saved "Wir gehen in der K". Thanks for any help.

Fredi
fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm

Re: german umlaute

Post by fredigertsch »

I found it: because I work now with mac it is: put ISOtoMac(tTextzeile1) into tTextzeile1
Thanks all Readers ;-)
trenatos
Posts: 189
Joined: Wed Jul 03, 2013 6:46 am
Contact:

Re: german umlaute

Post by trenatos »

I'm working with Swedish characters (åäö) and this helped me out too :)
Marcus
Post Reply