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

Japanese characters in console reported as space #2157

Open
nvaccessAuto opened this issue Mar 9, 2012 · 7 comments
Open

Japanese characters in console reported as space #2157

nvaccessAuto opened this issue Mar 9, 2012 · 7 comments

Comments

@nvaccessAuto
Copy link

Reported by tspivey on 2012-03-09 00:41
STR:

  1. Run intl.cpl (regional and language control panel), administrative tab, press change system locale, select japanese, ok, reboot when it asks.
  2. When the system comes back, open cmd. Paste:
echo これは試験です

And run it. If I move up to the line that it echoes, I can't move across individual characters. They're all reported as spaces. Trying to copy one reports no text, but moving across two of them allows me to copy one.
3. Optional: after fixing bug, reset locale and remove the Japanese keyboard layout it installed.

My first guess is it has something to do with multi-byte characters, since each one of those characters is two bytes in the ansi codepage.

@nvaccessAuto
Copy link
Author

Comment 1 by tspivey on 2012-03-11 20:30
This is what I know so far.
First, ReadConsoleOutputCharacter() is returning unicode, as I expected. Using the test string u'\u3053x' starting at 0,0:

read(length, startX, startY) #where x is column and y is row
read(1, 0, 0) = u' '
read(1, 1, 0) = u' '
read(2, 0, 0) = u'\u3053'
read(1, 2, 0) = u'x'

According to this, each multibyte character takes 2 columns.
We have the total number of columns on screen stored somewhere. If console reads worked on entire lines at a time, padding to the right with spaces, I think that would solve it.
Is there a better idea?

@bhavyashah
Copy link

@tspivey @nishimotz Could you please test and report whether or not the reported issue still persists?

@nishimotz
Copy link
Contributor

Though I haven't yet tested with the official builds, my working version based on the current master branch causes the issue mentioned here.
My setup is as follows:

  • Windows 10 Version 1703 (15063) 64bit Japanese
  • cmd.exe with new features enabled

Another issue may be related to this.
Reviewing the text by line, every Japanese characters are reported twice,
i.e. duplicated such as
ここれれはは試試験験でですす
The work around for this duplication we found so far is to choose the raster font.

@Adriani90
Copy link
Collaborator

@tspivey is this still reproducible in NVDA 2018.4 Beta 1?

@Adriani90
Copy link
Collaborator

@tspivey, just a reminder. Do you still have this problem in NVDA 2019.1.1?
cc: @nishimotz in case the author is not available, could you please test if this issue is still occuring? Thanks!

@Adriani90
Copy link
Collaborator

@nishimotz are you available to test if this is still an issue in NVDA 2019.2 RC2? Maybe the solution with UIA provided by @codeofdusk also solves this issue?

@nishimotz
Copy link
Contributor

Tested with 2019.2 rc2 installed.
When "Use UI Automation to access the Windows Console" is enabled, the issue of duplicated character readings does not occur.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants