• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Special Character Encoding

X X X

Newb
Joined
Jul 26, 2015
Messages
148
Reaction score
13
Hi,

I recently updated Ubuntu from 18.04 to 20.04. At some point after updating the OS to 20.04, I recompiled TFS sources to change something related to PvP. After the recompile, I noticed certain characters were no longer displayed correctly in-game:

1637767402266.png

This changed even though I didn't touch anything in items.xml. Items.xml is encoded with ISO-8859-1 in the distro, and the item name is like so:

XML:
 <item id="5657" name="jalapeño pepper" article="a" plural="jalapeño peppers">
        <attribute key="weight" value="30" />
 </item>

The same thing happened to character names. There was a character with "å" in their name, after recompiling for the first time in Ubuntu 20.04, that letter was changed to "Ã¥" instead. Never made any changes to MyAAC or the database or anything.

I understand this has something to do with encoding and decoding; did the Ubuntu 20.04 update include different libraries or something?

 
Re-bumping this since I still can't figure it out. The database shows the special character correctly. The server terminal shows the player's name with the special character correctly when they log in. But in the actual client (CipSoft client or OTClient), it's all messed up:
1698509487618.png
1698509399447.png
Where does the player name get sent to the client?
 
I need to install the font to the OS itself?
-----------------EDIT--------------------
Maybe this is useful for someone who is more skilled than me,

I made a lua talkaction script to allow me to change my name in game. The script works, I changed the char name to "test". Then, when I tried to change it back, I get the following error in the game console:
Code:
Sår has logged in.
Sår has logged out.
test has logged in.
test has logged out.
[Error - mysql_real_query] Query: UPDATE players SET name = 'S\�r' WHERE name = 'test';
Message: Data too long for column 'name' at row 1

So the game server can understand the special character if it's coming from the database? But when the client sends the special character it is encoded wrong, it comes through as \�?
 
Last edited:
Back
Top