The International Simutrans Forum

 

Author Topic: Using UTF8 charset in Simutrans translations  (Read 4459 times)

0 Members and 1 Guest are viewing this topic.

Offline Tomas

  • *
  • Posts: 251
Using UTF8 charset in Simutrans translations
« on: November 10, 2008, 08:36:39 PM »
Hi,
 it's possible that Simutrans will use UTF8 charset in translation texts?
I think it will remove the problems with encoding in "other" languages and simplify translating (SimuTranslator).

Thanks, Tomas

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Using UTF8 charset in Simutrans translations
« Reply #1 on: November 10, 2008, 09:08:15 PM »
I'll just add that this would probably need libiconv.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9512
  • Languages: De,EN,JP
Re: Using UTF8 charset in Simutrans translations
« Reply #2 on: November 10, 2008, 10:00:57 PM »
Simutrans uses UTF-8 since 85.01, was one of the very first thing I did to the code. However, SDL has some problems (understatement) with two-byte languages like chinese, japanese and so on and for that the GDI version is mandantory.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Using UTF8 charset in Simutrans translations
« Reply #3 on: November 11, 2008, 12:43:32 PM »
So it is already possible to have translation tab files in unicode?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9512
  • Languages: De,EN,JP
Re: Using UTF8 charset in Simutrans translations
« Reply #4 on: November 11, 2008, 12:51:36 PM »
The chinese, belorussian, russian and japanese are UTF-8. THese files just need to start with § as the very first character to recognize them as unicode.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Using UTF8 charset in Simutrans translations
« Reply #5 on: November 11, 2008, 01:05:46 PM »
So, just add BOM and paragraph and that's it? Then it could be made standard for all languages?

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9512
  • Languages: De,EN,JP
Re: Using UTF8 charset in Simutrans translations
« Reply #6 on: November 11, 2008, 03:35:40 PM »
No, better not. SDL support Uunicode not really very well. The is why I activate it only for few languages.

Offline Tomas

  • *
  • Posts: 251
Re: Using UTF8 charset in Simutrans translations
« Reply #7 on: November 11, 2008, 04:27:48 PM »
prissi: and is there any hope that all languages will be using UTF8 (in imminent future)?

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Using UTF8 charset in Simutrans translations
« Reply #8 on: November 11, 2008, 06:58:25 PM »
Prissi just said it is not a good idea ::)

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9512
  • Languages: De,EN,JP
Re: Using UTF8 charset in Simutrans translations
« Reply #9 on: November 11, 2008, 08:35:50 PM »
Why? Most editors show their native encoding (or can be set to) and simutranslator work well too. This is only of concern for people editing translation on machines without the proper encoding. But then, use iconv, (or Notepad) and make Unicode out of it. Simutrans can read UTF-8 too. (But without a proper Latin2.bdf, it cannot display it correctly).