Skip to content
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

use utf8 instead of the system encoding #4582

Merged
merged 9 commits into from
Feb 27, 2022

Conversation

ebbit1q
Copy link
Member

@ebbit1q ebbit1q commented Feb 25, 2022

Related Ticket(s)

Short roundup of the initial problem

filterString converts strings to the local char encoding, using utf8 might make it work properly on windows.

What will change with this Pull Request?

  • use toUtf8 instead of toLocal8Bit

because this is a windows bug I'm unable to test

@ebbit1q
Copy link
Member Author

ebbit1q commented Feb 25, 2022

in order to be able to make tests #4580 is now a dependency of this pr

@ebbit1q ebbit1q changed the title use utf8 instead of the system preference use utf8 instead of the system encoding Feb 25, 2022
@ebbit1q
Copy link
Member Author

ebbit1q commented Feb 25, 2022

a user on discord has been kind enough to verify if this actually works and it seems to have solved the problem

Copy link
Member

@tooomm tooomm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It solves the umlaut issue on Windows. 👍

@ebbit1q
Copy link
Member Author

ebbit1q commented Feb 27, 2022

@tooomm the build system was changed, I need someone to test if this build runs properly, did you test if servatrice runs?

@tooomm
Copy link
Member

tooomm commented Feb 27, 2022

Oh, I did not realize you merged #4580 (which I did not look at yet) into this PR as well.

I need someone to test if this build runs properly, did you test if servatrice runs?

I gave it a brief check. The server starts and I can connect to localhost on both ports (I did not change any server settings):

Using configuration file:  "C:/xxxxx/Cockatrice/Servatrice/servatrice.ini"
ERROR: can't open() logfile.
Servatrice 2.8.1-custom(9ef2c7a) (2022-02-25) starting.
-------------------------
Authenticating method: none
Store Replays: true
Client ID Required: false
Maximum user limit enabled: false
Accept registered users only: false
Registration enabled: false
Reset password enabled: false
Auditing enabled: true
Audit registration attempts enabled: true
Audit reset password attepts enabled: true
Adding room: ID= 0 name= "General room"
Starting status update clock, interval 15000 ms
Starting server on host "0.0.0.0" port 4747
Server listening.
Starting websocket server on host "0.0.0.0" port 4748
Websocket server listening.
Idle client timeout value: 3600
Set required client features to: QMap(("2.7.0_min_version", false)("2.8.0_min_version", false)("client_id", false)("client_ver", false)("client_warnings", false)("feature_set", false)("forgot_password", false)("idle_client", false)("mod_log_lookup", false)("room_chat_history", false)("user_ban_history", false)("websocket", false))
-------------------------
Server initialized.

Edit: Is it normal, that the given default location for the servatrice.ini (in the user directory) does not exist? 🤔

@ebbit1q
Copy link
Member Author

ebbit1q commented Feb 27, 2022

yes, that is expected, it is not actually loaded if not found, the logfile error is also funky, but it's working as expected according to you so I'll move ahead and merge #4580 👍 thanks

@ebbit1q ebbit1q merged commit baaf261 into Cockatrice:master Feb 27, 2022
@ebbit1q ebbit1q deleted the utf8filterstring branch February 27, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search for strings with umlaut characters
3 participants