Foreign letters - messed up between mac and windows
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Foreign letters - messed up between mac and windows
I've been coding on the mac lately and wanted to test my app in windows when I discovered that the the foreign letters i've written in the fields is messed up in windows. (norwegian: æøå)
I use array to store the text the user creates and save the the array to file with arrayencode/decode....Could this have anything to do with it?
Sjat
I use array to store the text the user creates and save the the array to file with arrayencode/decode....Could this have anything to do with it?
Sjat
Re: Foreign letters - messed up between mac and windows
I think that you should activate the unicode text:
Code: Select all
set the useUnicode to true
put the unicodeText of fld "NorvegianText" into mytempArray
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- VIP Livecode Opensource Backer
- Posts: 1236
- Joined: Sat Apr 08, 2006 1:10 pm
- Location: Zurich
- Contact:
Re: Foreign letters - messed up between mac and windows
Actually I think in this case it'd be enough to use mactoiso() and isotomac() at the correct place.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: Foreign letters - messed up between mac and windows
Thank you, Bvg and MaxV
Both options worked. This means that I now have a huge pile of work to do - since my app is text-based and I have a lot of fields with input and output. Damn. My whole app is text based and I have to make sure it works on all platforms for all languages....
I might as well go for unicode.
Yet again - Livecode have some nasty surprises. I used Livecode for this project because of it´s text handling power...
Anyway - thanks for the help
Both options worked. This means that I now have a huge pile of work to do - since my app is text-based and I have a lot of fields with input and output. Damn. My whole app is text based and I have to make sure it works on all platforms for all languages....
I might as well go for unicode.
Yet again - Livecode have some nasty surprises. I used Livecode for this project because of it´s text handling power...
Anyway - thanks for the help
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Foreign letters - messed up between mac and windows
Hi Sjat,
Are you using liveCode 7.0?
"Unicode just works" Right?
Simon
Are you using liveCode 7.0?
"Unicode just works" Right?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Foreign letters - messed up between mac and windows
Simon, oh my, that was a relief.
It seems to work by itself in 7. I have not used 7 because i was afraid of any bugs it might introduce...but I have no choice now do I
Thanks! Phew.
It seems to work by itself in 7. I have not used 7 because i was afraid of any bugs it might introduce...but I have no choice now do I
Thanks! Phew.
-
- VIP Livecode Opensource Backer
- Posts: 3901
- Joined: Sat Mar 24, 2007 2:54 am
- Location: Palo Alto
Re: Foreign letters - messed up between mac and windows
Hi Sjat,
So did you have to do anything else aside from upgrading to 7.0?
I'm very interested in learning if the new unicode stuff really is that easy.
Thanks,
Simon
So did you have to do anything else aside from upgrading to 7.0?
I'm very interested in learning if the new unicode stuff really is that easy.
Thanks,
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Foreign letters - messed up between mac and windows
Simon,
I will report back what I find. It will come in bits and pieces.
So far:
It seems for now that the only thing I have to do is write the help files again so it becomes unicode. But once I did it with one chapter the text is correct on both mac and windows. Other text is user made so it will depend on what language they use.
The area I have to do a thorough test is with my arrays - since some of the array keys will need to be unicode - depending on what the user types in.
My help file is also in an array and one thing that doesn´t work is "sort ascending numeric". I have different chapters with names that corresponds with an array key like: "1. Intro" and "2. How to begin" and so on. If I put the array keys in temp variable and do a "Sort Ascending numeric" on the variable and then put the result in a field it will not be sorted correctly as before. I tried to rename the keys but it didn´t help. Using "sort" without "ascending numeric" works as before except that the three extra norwegian letters at the end of the norwegian alphabet: "æ ø å" is not sorted correctly. They will be sorted at the end of the list but not in the correct order.
Sjat
I will report back what I find. It will come in bits and pieces.
So far:
It seems for now that the only thing I have to do is write the help files again so it becomes unicode. But once I did it with one chapter the text is correct on both mac and windows. Other text is user made so it will depend on what language they use.
The area I have to do a thorough test is with my arrays - since some of the array keys will need to be unicode - depending on what the user types in.
My help file is also in an array and one thing that doesn´t work is "sort ascending numeric". I have different chapters with names that corresponds with an array key like: "1. Intro" and "2. How to begin" and so on. If I put the array keys in temp variable and do a "Sort Ascending numeric" on the variable and then put the result in a field it will not be sorted correctly as before. I tried to rename the keys but it didn´t help. Using "sort" without "ascending numeric" works as before except that the three extra norwegian letters at the end of the norwegian alphabet: "æ ø å" is not sorted correctly. They will be sorted at the end of the list but not in the correct order.
Sjat
Re: Foreign letters - messed up between mac and windows
Hi Sjat,
I'm very interrested by your post because I've to deal a lot with text too.
I tried earlier the LC7 version, and tested the textEncode() function without success as said in this topic:
http://forums.runrev.com/viewtopic.php?f=7&t=19861
So if you get better results, please, let us know
Thanks in advance, Jean-Paul.
I'm very interrested by your post because I've to deal a lot with text too.
I tried earlier the LC7 version, and tested the textEncode() function without success as said in this topic:
http://forums.runrev.com/viewtopic.php?f=7&t=19861
So if you get better results, please, let us know
Thanks in advance, Jean-Paul.
Discovering LiveCode Community 6.5.2.