![]() ![]() We still need to test if it works properly on older Windows versions. I've tested this on Windows 10 with the system locale set to English, German and Chinese and various code pages and it now handles both #133 and #164 automatically, without having to change the code page. This is the case for JLine's LineReader implementation and probably most other applications. Consequently, Unicode works only properly when using the Writer directly (through Terminal.writer()). The output stream now emulates the old behavior: it decodes the written bytes using the configured code page. For compatibility reasons, we still need to support a OutputStream: some applications may use it directly through Terminal.output(). Since the Windows API accepts characters directly, the primary output for the Windows terminal now operates as Writer: the encoding step is skipped entirely. This pull request changes the Windows terminal implementation to use WriteConsoleW to write Unicode text directly to the console window - bypassing all problems caused by the code pages. Since we avoid all encoding problems for the input mechanism by using the Windows API to read a Unicode char directly, I've been looking for solutions to apply the same for console output. As an example, with the system locale set to Chinese, the UTF-8 code page will produce incorrect characters to be displayed. on Windows 10), it seems to be partially broken. This is an attempt to fix #133 and #164 at the same time, without having to set a code page manually.įurther investigation of #164 has shown: Even when the UTF-8 code page is supported just fine (e.g. To run the demo, simply use one of the following commands after having build JLine ![]() Note that all those artifacts are also installed in the local maven repository, so you will usually find them in the following folder: ~/.m2/repository/org/jline/. During development, the jline version will always ends with -SNAPSHOT, which means that the version is in development and not a release. ![]() The bundle contains all jars except jline-groovy that must be included in classpath if you want to use scripting capabilities. JLine can be used with a single bundle or smaller fine grained jars. JLine is distributed under the BSD License, meaning that you are completely free to redistribute, modify, or sell it with almost no restrictions. People familiar with the readline/editline capabilities for modern shells (such as bash and tcsh) will find most of the command editing features of JLine to be familiar. It is similar in functionality to BSD editline and GNU readline but with additional features that bring it in par with ZSH line editor. JLine is a Java library for handling console input. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |