Map Database  •  FAQ  •  RSS  •  Login

Devblog: Working towards Unicode

<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 17 Aug 2013, 19:34

Devblog: Working towards Unicode

This is an open-ended article about Unicode in KaM Remake. Easy at it sounds, Unicode is better to have than not. However there are few complications that need to be sorted out and YOUR opinion might help.

http://www.kamremake.com/devblog/adding ... e-support/

Your advice and opinions are welcome in comments and in this thread!
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 17 Aug 2013, 20:12

Re: Devblog: Working towards Unicode

Some programming languages and .NET uses 2 byte letters, it can contain any currently used letter and still easy to use. Only historical letters, e.g. egyptian hieroglyphs cannot be encoded with it, but it's probably not needed. I'm really for fixed size character size, even if 4 byte is used. Memory is a smaller problem than performance, and simplicity is always good in my opinion. Windows API is also using LPWSTR, which is a pointer to 2 byte chars.
<<

sado1

User avatar

Council Member

Posts: 1430

Joined: 21 May 2012, 19:13

KaM Skill Level: Skilled

Post 17 Aug 2013, 20:25

Re: Devblog: Working towards Unicode

If there was a simple way to tab between/copy and paste all the player names in the lobby, then Unicode names wouldn't be a problem anymore.
<<

Shadaoe

Knight

Posts: 584

Joined: 28 Jul 2011, 22:00

Website: https://www.youtube.com/user/KaMRemake

Post 17 Aug 2013, 22:44

Re: Devblog: Working towards Unicode

I think player names and mission names should stay ANSI, otherwise it'll easily get messy whenever you want to type one of these, and as you pointed out lobby passwords should use letters that everyone can type ;)
<<

Nissarin

User avatar

Pikeman

Posts: 185

Joined: 26 Sep 2012, 18:11

KaM Skill Level: Average

Location: Poland

Post 18 Aug 2013, 11:05

Re: Devblog: Working towards Unicode

I think that game files should be ascii only, you can always add some metadata (e.g. something like one txt per locale in mission folder) which will contain localized names of mission name/description, etc.
As for player names/passwords - ascii IMHO it would be a lot easier on everybody (might be a good idea to ask some Chinese players), it's just easier to communicate, copy-paste names in chat is just ridiculous idea. Passwords don't matter that much, since the player hosting the game will usually discus it with other beforehand but I don't think it's worth the trouble to have them localized.
Besides that if you ever wanted to implement some external authorization then anything other than ascii is asking for troubles.


Rant
Personally I think that utf8 is a better choice, simply because it's compatible with ascii so it's less messy to implement in existing project (it's somewhat compatible with ascii only libraries), utf16 in the other hand must be supported by any piece of code which deals with strings, unless you live in Asia utf16 is useless.
/Rant
<<

woloszek

User avatar

Sword Fighter

Posts: 394

Joined: 23 Apr 2012, 19:50

Location: Poland

Post 18 Aug 2013, 22:24

Re: Devblog: Working towards Unicode

Wow Krom ! You say in many languages :mrgreen: sorry I must wrote this :$
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 19 Aug 2013, 05:12

Re: Devblog: Working towards Unicode

@Kocsis: UTF16 is just like that, it uses 2byte chars unless it needs to encode something really rare, then it uses 2 more bytes.

@sado1: Still it would be an issue if you would have to write some Chinese players nicks outside the lobby.

@Shadaoe: I'm inclined towards this more and more after writing the article and reading the comments :)

@Nissarin: UTF16 is more straight in processing. For now we just assume it's 2 byte chars (ignore the 4byte chars).

@Woloszek: Haha, thanks :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de
<<

kocsis1david

Crossbowman

Posts: 204

Joined: 12 Mar 2011, 23:00

KaM Skill Level: Skilled

Location: Hungary

Post 19 Aug 2013, 07:56

Re: Devblog: Working towards Unicode

I meant one character is exactly 2 byte long, not more. If there are char above U+FFFF, it works as it would be two different letter.
So yours works the same if it ignores 4 byte chars.
<<

Krom

User avatar

Knights Province Developer

Posts: 3280

Joined: 09 May 2006, 22:00

KaM Skill Level: Fair

Location: Russia

Post 19 Aug 2013, 09:55

Re: Devblog: Working towards Unicode

@Kocsis: That's exactly how we are going to handle this for now :)
Knights Province at: http://www.knightsprovince.com
KaM Remake at: http://www.kamremake.com
Original MBWR/WR2/AFC/FVR tools at: http://krom.reveur.de

Return to “General / Questions”

Who is online

Users browsing this forum: No registered users and 4 guests