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
Location: Switzerland, Burgdorf

german umlaute

Post by fredigertsch » Wed Jul 13, 2011 7:50 pm

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: 9648
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: german umlaute

Post by dunbarx » Wed Jul 13, 2011 10:16 pm

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

Craig Newman

Klaus
Posts: 13824
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: german umlaute

Post by Klaus » Wed Jul 13, 2011 10:33 pm

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: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Re: german umlaute

Post by BvG » Wed Jul 13, 2011 10:53 pm

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
Location: Switzerland, Burgdorf

Re: german umlaute

Post by fredigertsch » Thu Jul 14, 2011 8:59 am

Thank you to all, i will try and report it.

fredigertsch
Posts: 38
Joined: Mon Jan 03, 2011 5:42 pm
Location: Switzerland, Burgdorf

Re: german umlaute

Post by fredigertsch » Fri Jul 29, 2011 7:37 pm

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
Location: Switzerland, Burgdorf

Re: german umlaute

Post by fredigertsch » Sat Jun 15, 2013 7:47 am

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
Location: Switzerland, Burgdorf

Re: german umlaute

Post by fredigertsch » Sat Jun 15, 2013 8:14 pm

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
Location: Virginia, USA
Contact:

Re: german umlaute

Post by trenatos » Fri Jul 05, 2013 8:57 pm

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

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”