Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Fix § character display #75

Closed Bielecki closed 4 years ago

Bielecki commented 4 years ago

Ascii doesn't contain "§" character, and it is used to color motd and other text. Sometimes it appears also in version name and player name. encode("utf-8") is solution here.

Examples of "§" character usage:
motd:

motd: " §4h §csomething something"

version:

version: v§cUse version 1.12! (protocol 335)

playername:

players: 1/250 ['\xc2\xa7cUse version 1.12+ (00000000-0000-0000-0000-000000000000)']

(\xa7 used above is the "§" character)

kevinkjt2000 commented 4 years ago

It has been several months now without any feedback from the original author. I'm not against this feature/fix, but I do want to address the changes I suggested. Anyone is free to submit another PR that does this. Closing this for now, but it can be re-opened if the author wants to address the changes.