Imported text characters are changed

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
johnJVT
Posts: 2
Joined: Sat Feb 11, 2017 5:04 pm

Imported text characters are changed

Post by johnJVT » Sat Feb 11, 2017 5:24 pm

We have an educational simulation game which was upgraded from vb with live code and we use all around the world to enable people to discover solutions for themselves. Recently we were asked to add French language menu, help and tooltips.

This we thought would be fine but we have an issue when we import French text to the app from a file.

Letters like è become È and special characters like … become Ö for example. There are many other changes to characters and punctuation that occur on the import of the text.

We have overcome this with pasting the original text into a text field on a language card and then read from it instead of a file but this is a compromise. In addition it means that all languages - the next is Turkish, then Italian have to be built in rather than loaded on demand.

We have also had an bigger issue with the Chinese version which in vb had to be undertaken with images instead of text.

Do you have any experience of this type of thing or any ideas about how to get a more consistent import of text so that the capitalisation and punctuation for example remains accurate please?

If in addition anyone has experience of how to import Chinese characters we would very grateful for any help you can give.

Regards
John

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

Re: Imported text characters are changed

Post by Klaus » Sat Feb 11, 2017 5:49 pm

Hi John,

1. welcome to the forum! :D

2. What platform are you working on?
In what format do the text files come along?
What is the internal text encoding of these files?

You can already take a look at the "textencode" and "textdecode" functions in the dictionary.


Best

Klaus

Jeanne DeVoto
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10
Joined: Wed Apr 12, 2006 12:23 am
Contact:

Re: Imported text characters are changed

Post by Jeanne DeVoto » Tue Feb 14, 2017 7:58 pm

John, your example characters look very much like what happens when you change text in the Apple/Mac character set to ISO-Latin (used by Windows). In other words, it sounds as though your original files aren't Unicode, and were prepared on a Mac and then imported on Windows. Is this possible?

If that sounds like it might be the problem, check out the macToISO and ISOToMac functions (which translate between the two character sets).

johnJVT
Posts: 2
Joined: Sat Feb 11, 2017 5:04 pm

Re: Imported text characters are changed

Post by johnJVT » Thu Feb 16, 2017 10:26 am

Klaus Jennie thank you for replying. I will look at what you have suggested.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”