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

Console cyrillic input support? #736

Closed
molor opened this issue Jun 12, 2017 · 14 comments
Closed

Console cyrillic input support? #736

molor opened this issue Jun 12, 2017 · 14 comments

Comments

@molor
Copy link

molor commented Jun 12, 2017

Paper buid №1121 or newer seems that does not support Cyrillic input.

I'm using Windows 8.1 x64, Java 1.8 x64.
Server is running via cmd.exe without custom codepage.
If I'm type "тест", in console it's always appears as "╤В╨╡╤Б╤В".

Initial discussion: #728 (review)

@stephan-gh
Copy link
Contributor

It works without problems on Linux but I can reproduce a similar problem on Windows. Unlike for you it just prints ? for all the characters though. Additionally, the same happens for all older Paper builds as well.

It's probably an encoding problem in JLine but I'm not quite sure how all of that works on Windows.

Can you paste the output of running chcp in your Windows command prompt?

@molor
Copy link
Author

molor commented Jun 12, 2017

@Minecrell, Active code page: 866

@Black-Hole
Copy link
Contributor

You could try to run "chcp 65001" before starting the server.

@molor
Copy link
Author

molor commented Jun 12, 2017

chcp 65001

Loading libraries, please wait...
2017-06-12 19:36:29,739 main ERROR Unable to inject fields into builder class for plugin type class org.apache.logging.log4j.core.appender.ConsoleAppender, element Console. java.nio.charset.UnsupportedCharsetException: cp65001
        at java.nio.charset.Charset.forName(Unknown Source)
        at org.apache.logging.log4j.util.PropertiesUtil.getCharsetProperty(PropertiesUtil.java:146)
        at org.apache.logging.log4j.util.PropertiesUtil.getCharsetProperty(PropertiesUtil.java:134)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Target.getCharset(ConsoleAppender.java:85)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Target$1.getDefaultCharset(ConsoleAppender.java:71)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:218)
        at org.apache.logging.log4j.core.appender.ConsoleAppender$Builder.build(ConsoleAppender.java:185)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
        at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:537)
        at net.minecraft.server.v1_12_R1.MinecraftServer.<clinit>(MinecraftServer.java:55)
        at org.bukkit.craftbukkit.Main.main(Main.java:220)

2017-06-12 19:36:29,749 main ERROR Unable to invoke factory method in class clas
s org.apache.logging.log4j.core.appender.ConsoleAppender for element Console. java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.ConsoleAppender
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:224)
        at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:130)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:952)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:892)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:884)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:508)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:232)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:244)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:545)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:617)
        at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:634)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:229)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:152)
        at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:45)
        at org.apache.logging.log4j.LogManager.getContext(LogManager.java:194)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:551)
        at org.apache.logging.log4j.LogManager.getLogger(LogManager.java:537)
        at net.minecraft.server.v1_12_R1.MinecraftServer.<clinit>(MinecraftServer.java:55)
        at org.bukkit.craftbukkit.Main.main(Main.java:220)

2017-06-12 19:36:30,132 main ERROR Null object returned for Console in Appenders.
2017-06-12 19:36:30,140 main ERROR Unable to locate appender "WINDOWS_COMPAT" for logger config "root"

@molor
Copy link
Author

molor commented Jun 12, 2017

Now, instead of cyrillic displayed ���������

@electronicboy
Copy link
Member

Java doesn't support the unicode codepage, does chcp 855 produce any difference? I just woke up, so would have to take a look, but windows poor support for unicode could be a "fun" problem here

@zachbr
Copy link
Contributor

zachbr commented Jun 12, 2017

I was testing chcp 1251 earlier to see if it helped and while I could now paste cyrillic characters, they seemed to get garbled by the time they entered ingame chat.

This could be something that needs to be handled at a system level by Windows, currently spinning up a VM to test.

@molor
Copy link
Author

molor commented Jun 12, 2017

does chcp 855 produce any difference?

Same problem..
11

@zachbr
Copy link
Contributor

zachbr commented Jun 12, 2017

I can't even get it working on builds before all of the input and logging changes, tested against build 1112 on a fresh install of Windows 10, both with English/US region and language, as well as Russian region and language selected.

All input is always coming across as ?????.

@stephan-gh
Copy link
Contributor

I'm pretty sure this is an issue in JLine, so I've opened jline/jline3#133

@crevice
Copy link

crevice commented Jun 28, 2017

try
-Dlog4j.configurationFile=log4j2.xml -Dfile.encoding=CP866 -jar spigot.jar
in your server strart script

@zachbr
Copy link
Contributor

zachbr commented Jun 28, 2017

@Minecrell did you ever look into what we need to do to use the jline fixes that have been committed? Is there anything we need to do or is it all handled by your implementation?

@stephan-gh
Copy link
Contributor

stephan-gh commented Jun 28, 2017

@Zbob750 You'd need to update to the JLine snapshot version because there is no new release yet. I don't think we need any additional changes in Paper.

@zachbr
Copy link
Contributor

zachbr commented Jun 30, 2017

Thanks, in retrospect I should've known that :(

For now, we will wait on the next Jline release. If this issue becomes more problematic or affects additional users we can reconsider waiting.

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

No branches or pull requests

6 participants