New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ut2k4server] adds Escape characters to server config #1448

Closed
jrmain opened this Issue May 26, 2017 · 14 comments

Comments

@jrmain

jrmain commented May 26, 2017

The ut2k4server script is adding Escape characters to parts of the main server config (serverfiles/System/ut2k4-server.ini). For example:
[Default�DM MaplistRecord]

I tried replacing all of those Escape characters with spaces, and when I restarted the server, they came back immediately.

Any idea why? Are they somehow intentional, in which case, wat?

@jrmain

This comment has been minimized.

jrmain commented Jun 1, 2017

It's also adding weird characters to the ServerName setting (eg. JDRGaming UT2004 Coop), although I can't see those characters in the settings files. They do appear in some server lists, like Qtracker.

Correction: those weird characters do appear in the server settings file, but appear as spaces if viewing the file as UTF-8 encoded. Switching to ANSI encoding shows the weird characters. Apparently these are unicode non-breaking space characters, and they should not be added by the server or web admin UI.

This also affects the MessageOfTheDay setting.

@MarkL4YG

This comment has been minimized.

MarkL4YG commented Jun 1, 2017

@jrmain check if setting UT2K4 to UTF-8 mode fixes your problem.

@jrmain

This comment has been minimized.

jrmain commented Jun 1, 2017

@MarkL4YG Are you talking about the LinuxGSM fix_ut2k4.sh function? If not, how would I go about changing UT2K4 to UTF-8 mode?

@MarkL4YG

This comment has been minimized.

MarkL4YG commented Jun 2, 2017

@jrmain I guess you will have to google that. I did some quick searches and read about ppl switching to UTF locales fixing similar issues. Take a look here for example

@jrmain

This comment has been minimized.

jrmain commented Jun 2, 2017

@MarkL4YG That does seem to be a related issue. But the setting in question was already UTF-8 on my server. I'll try changing it to iso-8859-1.

This does seem to be an issue with the UT2004 server itself. I've also noticed a few other servers with the same problem. Clearly the web admin interface is adding the weird characters.

In the meantime, I changed the MOTD and ServerName settings with a text editor, and they seem fine.

I also wonder about the LinuxGSM fix_ut2k4.sh function, which alters that same setting: when does that script run?

@MarkL4YG

This comment has been minimized.

MarkL4YG commented Jun 2, 2017

@jrmain You could run a search through the script files to see when it's called.

@jrmain

This comment has been minimized.

jrmain commented Jun 2, 2017

According to functions/fix.sh, that particular script only runs during installation. So if I switch back to iso-8859-1 I don't have to worry about it getting switched back automatically.

@MarkL4YG

This comment has been minimized.

MarkL4YG commented Jun 2, 2017

If that file fixes your problem you could also periodically run it.

@jrmain

This comment has been minimized.

jrmain commented Jun 2, 2017

It doesn't. The setting was already UTF-8, and was probably set that way by the fix script when I installed the server. I'll switch back to iso-8859-1 as a test.

@jrmain

This comment has been minimized.

jrmain commented Jun 2, 2017

I changed the setting in serverfiles/System/UWeb.int from 'utf-8' to 'iso-8859-1' and restarted the server. It didn't seem to have any effect at all. Regardless of the setting, the MOTD string gets messed up when I edit it in web admin (unicode characters are added). Weirdly, I'm no longer seeing any issues with ServerName.

@jrmain

This comment has been minimized.

jrmain commented Sep 10, 2018

I recently reinstalled my UT2K4 server from scratch. The problem with garbage characters appearing in the server name and map lists in the game server configuration file happpened again.

I noticed that the file (serverfiles/System/ut2k4server.ini) was in Ansi mode. I converted it to UTF-8 and saved the file, and this seems to have fixed the problem.

I edited the server settings using the UT2K4 web UI, and the file was updated, but stayed UTF-8, and no garbage characters appeared.

I'm not sure how that config file is created during LinuxGSM server install, or if it's just a copy of one of the files in the official UT2K4 server distribution, but it does seem to start out as ANSI.

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Sep 10, 2018

https://github.com/GameServerManagers/Game-Server-Configs/blob/master/UnrealTournament2004/UT2004.ini

It copied from there so it might just need converting. I will look in to this as it wont take long.

@dgibbs64 dgibbs64 added this to the Next Release milestone Sep 10, 2018

@dgibbs64 dgibbs64 self-assigned this Sep 10, 2018

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Sep 10, 2018

I have updated the .gitatributes file https://github.com/GameServerManagers/Game-Server-Configs/blob/master/.gitattributes hopfully it has fixed the issue. Please can you test for me.

@jrmain

This comment has been minimized.

jrmain commented Sep 10, 2018

I installed a new UT2K4 server as a test, and after the install, the file (serverfiles/System/ut2k4server.ini) is UTF-8. Seems fixed.

@dgibbs64 dgibbs64 closed this Sep 12, 2018

@dgibbs64 dgibbs64 changed the title from UT2K4 server adds Escape characters to server config to [ut2k4server] adds Escape characters to server config Oct 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment