pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.27k stars 1.54k forks source link

The server does not start if the path to the directory contains Cyrillic characters #4353

Closed Gaprix closed 3 years ago

Gaprix commented 3 years ago

Issue description

The server does not start if the path to the directory contains Cyrillic characters

Steps to reproduce the issue

  1. start the server in the directory, the path to which contains cyrillic characters

OS and versions

Plugins

none

Crashdump, backtrace or other files

изображение изображение https://pastebin.com/B3c0n27p

SOF3 commented 3 years ago

Can you upload a fresh server.log?

Gaprix commented 3 years ago

server.log does not contain the errors that are displayed in the console

server.log изображение

dktapps commented 3 years ago

Can you paste the file path you used as text here in the issue? I'd like to test some things.

Gaprix commented 3 years ago

C:\Users\acpla\OneDrive\Рабочий стол\rgrgr\y\PocketMine-MP

dktapps commented 3 years ago

I'm not able to reproduce this on a machine using en-GB locale. What locale is your machine using?

Gaprix commented 3 years ago

ru-RU

dktapps commented 3 years ago

I'm not able to reproduce this even after switching Windows language to Russian. I'm not sure what else can be done to debug this.

Do you have any plugins which are changing the locale via setlocale()?

Gaprix commented 3 years ago

No

dktapps commented 3 years ago

Have you tried running the server from a different folder (not in OneDrive)?

Gaprix commented 3 years ago

I tried to start the server in C:\PocketMine-MP and there were no errors

dktapps commented 3 years ago

I mean a path with Cyrillic characters in it (e.g. C:\Рабочий стол\rgrgr\y\PocketMine-MP

Gaprix commented 3 years ago

Checked in the C:\Тест directory and got the same error изображение

dktapps commented 3 years ago

Can you run chcp in cmd.exe and post the output?

Gaprix commented 3 years ago
C:\WINDOWS\system32>chcp
Текущая кодовая страница: 866
Gaprix commented 3 years ago

The error disappeared after I enabled "beta unicode support" in the regional settings. But I think it's not okay that I had to turn it on изображение

dktapps commented 3 years ago

Thanks for the information. I'm still not able to reproduce the problem, whether or not I enable/disable that setting.

dktapps commented 3 years ago

Please try https://github.com/pmmp/PocketMine-MP/commit/853222c26075ba7b9bb4b2dfb1a75b4f07986ba1 and see if it resolves your issue.

Gaprix commented 3 years ago

It did not help.

My actions:

  1. Turned off "beta unicode support".
  2. Rebooted the computer.
  3. Confirmed that the error appears again.
  4. Downloaded your commit and ran it.

Result: https://pastebin.com/4pfiU6pb изображение

dktapps commented 3 years ago

I guess some base64 hack will be needed for this after all. Windows sucks >.<

dktapps commented 3 years ago

Please try again with https://github.com/pmmp/PocketMine-MP/commit/baf1f1315acaa29d077bd2556cbf17ab61631788.

Gaprix commented 3 years ago

This fixed the error. Thanks! изображение

dktapps commented 3 years ago

Excellent. May I ask what version of Windows 10 you're using? I wonder if this might have been resolved by updating to a newer version (I haven't been able to reproduce it at all on 21H1).

Gaprix commented 3 years ago

I have 21H1 (19043.1110) изображение

dktapps commented 3 years ago

How bizarre. That's the exact same version I have.

The fix has been merged to master, so I'm going to close this, but if anyone knows a better way to solve this problem, please let me know.