News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Unicode query

Started by jamespetts, December 27, 2014, 10:40:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

Is Simutrans supposed to support the extended Unicode character set in the GUI? When I tried to use a unicode character representing a clock face in Experimental (the character is: ?), it was replaced in game with "??".
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Ters

I've never heard of any "extended Unicode character set", and the character you posted won't even show up in Firefox on Linux. Could you post the code point value? In any case, what Simutrans can display depends on the font.

jamespetts

I found the symbol here. It apparently has a code of U+1F551 or 128337.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

DrSuperGood

It depends I would imagine. At times it looks like much of the dialog (eg the network join details and errors) use only standard ASCII "char" type instead of "wchar". Unless I am missing some strange compiler behaviour of course.

Ters

Quote from: DrSuperGood on December 28, 2014, 01:23:08 AM
It depends I would imagine. At times it looks like much of the dialog (eg the network join details and errors) use only standard ASCII "char" type instead of "wchar". Unless I am missing some strange compiler behaviour of course.

Simutrans, like the *nix world, uses UTF-8 when it does Unicode. wchar_t is very wasteful on *nix, with 300% overhead for most of the world. Windows doesn't waste as much space on wchar_t, but is as difficult to use as char with UTF-8 anyway.

prissi

Extended unicode support is not very widespread, and simutrans only supports characters until 65535. However, there are four used defined characters in this range. Deinfe your clock as one of them. Or better, make it a symbol from the dat files ...

jamespetts

Can a symbol from the .dat files be inserted into text?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

Not really; but you can define th elower coderange (1-31) with characters form a default font. THe unicode font usually does not touch these.

MAybe do it like the smilies in the halt dialogue.