Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6873741
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:06:25+00:00 2026-05-27T04:06:25+00:00

When I type in chinese characters in the REPL, only question marks are displayed,

  • 0

When I type in chinese characters in the REPL, only question marks are displayed, as in my second screenshot. How can I fix this? My scala version is 2.9.0.1 and OS windows

before input the Chinese: 中国 using 搜狗输入法

after input

Can't display the Chinese word correctly

Even if I start REPL with a property -Dfile.encoding="UTF-8"

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:06:26+00:00Added an answer on May 27, 2026 at 4:06 am

    Ah, you’re on Windows. I don’t think this is supported at the moment. I some idea of what’s going on. See https://issues.scala-lang.org/browse/SI-4711 for the investigation.

    The root of the issue is:

    1. jline2 (its jansi dependency) loads a DLL that uses some variant of 8 bits getc to read characters at the console and does not support double byte characters. The API call that could be used instead is ReadConsoleInputW.
    2. The REPL output printing uses the underlying Java System.out which does not print unicode characters reliably – although your first snapshot in your question seems to imply that it works*.

    I’m not part of the Scala team, but I tried to fix it and I may have something working more or less. See https://github.com/fusesource/jansi-native/blame/master/src/main/java/org/fusesource/jansi/internal/WindowsSupport.java (based on WriteConsoleW and ReadConsoleInputW and other additions in the REPL ILoop source – the changes are somewhere in my fork on github – not updated in a while.

    If you are interested, I may be able to provide an experimental fork of the 2.9.0.1 scala-compiler.jar and jline.jar and you could tell me if it works.

    *What is the code that prints :1: xx 2:xx 3:xx 4:x 5:x where x is some chinese character?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We can store Chinese character into mysql table Using this ( meta http-equiv=Content-type value=text/html;
I have read this jsp page encoding problem and this Save Chinese characters with
Consider type like this one public interface IHaveGenericMethod { T1 Method<T1>(T1 parm); T2 Method<T1,T2>(T1
The type of this function is function :: Num a => ([Char],a) -> ([Char],a)
I have run my rhodes application in Android emulator. When i type characters in
Type-hints can make a huge improvement on execution time where reflection occurs many times.
can anyone tell me what encoding is applied on the chinese character, so that
This code displays hello in chinese char buffer[10]=hello; AfxMessageBox((LPCTSTR)buffer); while this code displays it
On the web site I am trying to help with, user can type in
I store a json string that contains some (chinese ?) characters in a mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.