Fullwidth Unicode forms display incorrectly

Mar 14, 2018
2
0
In TakeCommand, fullwidth Unicode forms (Halfwidth and Fullwidth Forms (Unicode block) - Wikipedia) are handled incorrectly. They appear to confuse some internal column tracker, and cause the console to wrap poorly.

The problem can be seen by executing "for /L %c in (65313,1,65338) do echo Fullwidth %c: %@CHAR[%c]" at the command line.

The problem appears to be associated with the underlying windowing code, as running the same command in TCC hosted in the new Windows Terminal does not exhibit the problem.

Use case: I regularly use fullwidth forms of characters which would otherwise be disallowed in filenames (\ / : * ? " < > |), because the fullwidth forms are legal.
 

rconn

Administrator
Staff member
May 14, 2008
11,957
133
I was hoping nobody would discover or want to use those characters! :rolleyes:

Take Command supports wide characters for Far East code pages, but I haven't enabled it for everybody else because it results in a performance hit while drawing text because Take Command has to check each character to see if it's either 2-columns or (worse) 0-columns.

I've enabled this for everybody in the next build.
 
  • Like
Reactions: banshee

samintz

Scott Mintz
May 20, 2008
1,434
13
Solon, OH, USA
Given that most people don't use wide characters, is there a way to enable or disable support with an INI directive?
 
May 30, 2008
226
2
If it's just an extra if-statement, how much difference can it make? And if most characters are one way, then shouldn't the branch predictor basically handle it for free?