Author Topic: Conversion to utf-8  (Read 2853 times)

0 Members and 1 Guest are viewing this topic.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Conversion to utf-8
« 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 about conversion of Czech)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4279
  • Total likes: 195
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Conversion to utf-8
« Reply #1 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.
Parsley, sage, rosemary, and maggikraut.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Conversion to utf-8
« Reply #2 on: February 15, 2012, 09:01:51 AM »
Font and tab-files are not a problem. However...

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?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Online Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4279
  • Total likes: 195
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Conversion to utf-8
« Reply #3 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.
Parsley, sage, rosemary, and maggikraut.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Conversion to utf-8
« Reply #4 on: February 15, 2012, 02:50:12 PM »
...I'd love to hear from Frank or Jonas, though, before things start breaking :)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline sdog

Re: Conversion to utf-8
« Reply #5 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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8830
  • Total likes: 324
  • Helpful: 229
  • Languages: De,EN,JP
Re: Conversion to utf-8
« Reply #6 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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Conversion to utf-8
« Reply #7 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

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!