The International Simutrans Forum

Development => Translation and Help Texts => Topic started by: VS on February 14, 2012, 08:52:03 PM

Title: Conversion to utf-8
Post by: VS on February 14, 2012, 08:52:03 PM
How hard is it to change an existing language to utf-8? What would have to be done?

(Ongoing discussion (http://forum.simutrans.com/index.php?topic=722.msg86665#msg86665) about conversion of Czech)
Title: Re: Conversion to utf-8
Post by: Dwachs on February 15, 2012, 08:00:45 AM
There is a button in the translator page to change the encoding. I will not press it  :-X

Changing the encoding will affect and break all translations of everything (paksets, web site content, who knows what).

The best idea to test is to create a new language like Czech_utf8 and upload some files. What is needed: a suitable bdf font (if the existing ones to not cover Czech), and a tab-file of translated strings (base program strings) in utf8-encoding.
Title: Re: Conversion to utf-8
Post by: VS on February 15, 2012, 09:01:51 AM
Font and tab-files are not a problem. However...

Quote from: Dwachs on February 15, 2012, 08:00:45 AM
Changing the encoding will affect and break all translations of everything (paksets, web site content, who knows what).
Well, that's what the question was really about. Sorry about not being precise enough. I mean - will we have to download all texts, convert and reupload?
Title: Re: Conversion to utf-8
Post by: Dwachs on February 15, 2012, 10:45:51 AM
I would say yes. It sounds like the more failure proof way than fiddling with the translators internals.
Title: Re: Conversion to utf-8
Post by: VS on February 15, 2012, 02:50:12 PM
...I'd love to hear from Frank or Jonas, though, before things start breaking :)
Title: Re: Conversion to utf-8
Post by: sdog on February 15, 2012, 05:30:15 PM
wouldn't this be something that could and should be done globaly when a new gui is implemented, i'm refering to Markohs' two projects CEGUI and 3D. There souldn't be no need to support anything but utf8 today.
Title: Re: Conversion to utf-8
Post by: prissi on February 17, 2012, 11:43:34 PM
As far, as I know, the compiler internally handles everything at unicode. Input via web-upload must be also Unicode anyway. Only when exporting, the codepage is chosen. But make a language cz_test. Encode is as latin 2, upload something, change encoding and export.

But be aware that SDL has some issues with unicode, if there are letter composed of two keypresses.
Title: Re: Conversion to utf-8
Post by: VS on February 19, 2012, 04:35:05 PM
I tested the suggested changes, and it seems that this is possible. I think that's all we need and great news :D