There are frequently asked questions upon box characters in J. The box
characters in J on non-English(or latin-1) environment creates a few
problems, which can be avoided or solved with unicode.
First of all, what is the rationale for assigning a.{~16+i.11 to box
characters? It's not ASCII nor unicode. Where are they from? (a friend
of mine, who have an extensive knowledge on unicode and character
encodings told me the choice is weird)
Second, the box is broken with different width characters(that is,
when the length of bytes of the encoding, and the width of the
characters on display don't match). What is the usual way of solving
it in other programming languages? There is a unicode standard for
character widths. http://unicode.org/reports/tr11/
Python implements that standard(along with others) in unicodedata module.
unicodedata.east_asian_width(u'한')
'W'
unicodedata.east_asian_width(u'a')
'Na'
(u specifies the following string is unicode. east_asian_width returns
the width of the character, not only for east asian characters but all
unicode characters; it's got a narrow name due to its history)
Many programming language implementations and platforms use already
implemented unicode libraries, which have quite good quality. One of
them is ICU from IBM. http://www.ibm.com/software/globalization/icu
Its license is very loose. Some uses a part of ICU and some includes
it wholely.
Using existing solutions, we could improve the box display in J.
2007/2/1, Thomas Costigliola <[EMAIL PROTECTED]>:
I am trying to use the line drawing characters on edit controls on a form. I set the font
to "Courier New" which is the same as my session window. Copying and pasting
from my session into the edit control displays the characters correctly however they do
not show correctly when using wd 'set'
9!:6 shows the correct characters in my session window but
wd 'set e *', 9!:6''
does not display the correct characters even if 'e' is an editijx control.
Any pointers would be greatly appreciated.
-Thomas
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm