[GH-ISSUE #1448] [ut2k4server] adds Escape characters to server config #1128

Closed
opened 2026-02-27 02:55:27 +03:00 by kerem · 15 comments
Owner

Originally created by @jrmain on GitHub (May 26, 2017).
Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1448

Originally assigned to: @dgibbs64 on GitHub.

The ut2k4server script is adding Escape characters to parts of the main server config (serverfiles/System/ut2k4-server.ini). For example:
[DefaultDM 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?

Originally created by @jrmain on GitHub (May 26, 2017). Original GitHub issue: https://github.com/GameServerManagers/LinuxGSM/issues/1448 Originally assigned to: @dgibbs64 on GitHub. The ut2k4server script is adding Escape characters to parts of the main server config (serverfiles/System/ut2k4-server.ini). For example: `[DefaultDM 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?
Author
Owner

@jrmain commented on GitHub (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.

<!-- gh-comment-id:305504938 --> @jrmain commented on GitHub (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.
Author
Owner

@MarkTwoFive commented on GitHub (Jun 1, 2017):

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

<!-- gh-comment-id:305610610 --> @MarkTwoFive commented on GitHub (Jun 1, 2017): @jrmain check if setting UT2K4 to UTF-8 mode fixes your problem.
Author
Owner

@jrmain commented on GitHub (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?

<!-- gh-comment-id:305625901 --> @jrmain commented on GitHub (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?
Author
Owner

@MarkTwoFive commented on GitHub (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

<!-- gh-comment-id:305713063 --> @MarkTwoFive commented on GitHub (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](https://forums.tripwireinteractive.com/forum/killing-floor/technical-support-aa/dedicated-server-support-aa/32610-webadmin-fixes)
Author
Owner

@jrmain commented on GitHub (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?

<!-- gh-comment-id:305812722 --> @jrmain commented on GitHub (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?
Author
Owner

@MarkTwoFive commented on GitHub (Jun 2, 2017):

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

<!-- gh-comment-id:305832918 --> @MarkTwoFive commented on GitHub (Jun 2, 2017): @jrmain You could run a search through the script files to see when it's called.
Author
Owner

@jrmain commented on GitHub (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.

<!-- gh-comment-id:305871248 --> @jrmain commented on GitHub (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.
Author
Owner

@MarkTwoFive commented on GitHub (Jun 2, 2017):

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

<!-- gh-comment-id:305876680 --> @MarkTwoFive commented on GitHub (Jun 2, 2017): If that file fixes your problem you could also periodically run it.
Author
Owner

@jrmain commented on GitHub (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.

<!-- gh-comment-id:305883934 --> @jrmain commented on GitHub (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.
Author
Owner

@jrmain commented on GitHub (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.

<!-- gh-comment-id:305888753 --> @jrmain commented on GitHub (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.
Author
Owner

@jrmain commented on GitHub (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.

<!-- gh-comment-id:419969469 --> @jrmain commented on GitHub (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.
Author
Owner

@dgibbs64 commented on GitHub (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.

<!-- gh-comment-id:420020120 --> @dgibbs64 commented on GitHub (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.
Author
Owner

@dgibbs64 commented on GitHub (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.

<!-- gh-comment-id:420033244 --> @dgibbs64 commented on GitHub (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.
Author
Owner

@jrmain commented on GitHub (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.

<!-- gh-comment-id:420052058 --> @jrmain commented on GitHub (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.
Author
Owner

@lock[bot] commented on GitHub (Oct 27, 2019):

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:546742307 --> @lock[bot] commented on GitHub (Oct 27, 2019): This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No labels
Atomic
Epic
cannot reproduce
command: backup
command: console
command: debug
command: details
command: fast-dl
command: install
command: mods
command: monitor
command: post-details
command: restart
command: send
command: start
command: stop
command: update
command: update-lgsm
command: validate
command: wipe
distro: AlmaLinux
distro: Arch Linux
distro: CentOS
distro: Debian
distro: Fedora
distro: RedHat
distro: Rocky Linux
distro: Ubuntu
distro: openSUSE
engine: goldsrc
engine: source
game: 7 Days to Die
game: ARMA 3
game: Ark: Survival Evolved
game: Assetto Corsa
game: Avorion
game: BATTALION: Legacy
game: Barotrauma
game: Battalion 1944
game: Battlefield 1942
game: Black Mesa: Deathmatch
game: Blade Symphony
game: Call of Duty 2
game: Call of Duty 4
game: Call of Duty: United Offensive
game: Counter-Strike 1.6
game: Counter-Strike 2
game: Counter-Strike: Global Offensive
game: Counter-Strike: Source
game: Day of Infamy
game: Dayz
game: Death Match Classic
game: Don't Starve Together
game: ET: Legacy
game: Eco
game: Factorio
game: Factorio
game: Garry's Mod
game: Half-Life
game: Hurtword
game: Insurgecy
game: Insurgecy
game: Insurgency: Sandstorm
game: Just Cause 3
game: Killing Floor
game: Killing Floor 2
game: Left 4 Dead 2
game: Minecraft
game: Minecraft Bedrock
game: Mordhau
game: Multi Theft Auto
game: Mumble
game: Natural Selection 2
game: No More Room in Hell
game: Pavlov VR
game: Post Scriptum
game: Project Zomboid
game: Quake 3
game: QuakeWorld
game: Red Orchestra: Ostfront 41-45
game: Return to Castle Wolfenstein
game: Rising World
game: Rust
game: San Andreas Multiplayer
game: Satisfactory
game: Soldat
game: Soldier of Fortune 2
game: Squad
game: Squad 44
game: Starbound
game: Stationeers
game: Sven Co-op
game: Team Fortress 2
game: Teamspeak 3
game: Teeworlds
game: Terraria
game: The Front
game: Unreal Tournament 2004
game: Unreal Tournament 3
game: Unreal Tournament 99
game: Unturned
game: Valheim
game: Wurm Unlimited
game: Zombie Master Reborn
game: label missing
good first issue
help wanted
info: alerts
info: dependency
info: docker
info: docs
info: email
info: query
info: steamcmd
info: systemd
info: tmux
info: website
info: website
needs more info
outcome: duplicate
outcome: issue resolved
outcome: issue resolved
outcome: issue unresolved
outcome: pr accepted
outcome: pr rejected
outcome: unconfirmed
outcome: wontfix
outcome: wrong forum
potential-duplicate
priority
pull-request
type: bug
type: feature
type: feature
type: feature request
type: game server request
type: refactor
waiting response
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/LinuxGSM#1128
No description provided.