Note also: 9!:7 '┌┬┐├┼┤└┴┘│─' |length error
-- Raul On Tue, May 28, 2013 at 9:20 AM, Raul Miller <[email protected]> wrote: > On Tue, May 28, 2013 at 9:00 AM, Don Guinn <[email protected]> wrote: >> The unicode numbers for the box characters are >> >> 9!:6 '' >> ┌┬┐├┼┤└┴┘│─ > > Yes, I get this. > >> 3 u: 9!:6 '' >> 16 17 18 19 20 21 22 23 24 25 26 > > I confirm this result also. > >> 3 u: 7 u: '┌┬┐├┼┤└┴┘│─' >> 9484 9516 9488 9500 9532 9508 9492 9524 9496 9474 9472 > > This one is interesting. Those characters are the characters from the > original line, but > 3 u: 7 u: 9!:6 '' > 16 17 18 19 20 21 22 23 24 25 26 > > So what happened here? > > I think the issue is that the OS sees those characters and provides > them back to J as unicode characters. > >> 9!:7]4 u: 9484 9516 9488 9500 9532 9508 9492 9524 9496 9474 9472 >> |domain error >> | 9!:7]4 u:9484 9516 9488 9500 9532 9508 9492 9524 9496 9474 9472 > > A related issue is: > '┌┬┐├┼┤└┴┘│─' -: 4 u: 9484 9516 9488 9500 9532 9508 9492 9524 9496 9474 > 9472 > 0 > > Or, more concisely: > (-: 4 u: 3 u: 7 u: ]) '┌┬┐├┼┤└┴┘│─' > 0 > > Or, more concisely: > (-: 7 u: ]) '┌┬┐├┼┤└┴┘│─' > 0 > > I'm not completely sure why J does not allow "wchar" for 9!:7 but that > is something that should probably eventually be changed. > >> JVERSION >> Engine: j701/2011-01-10/11:2 >> Library: 8.01.011 >> Qt IDE: 1.0.8 >> Platform: Win 64 >> Installer: j801 beta install >> InstallPath: c:/j/j64-801a > > I was also using J8 (which of course uses the J7 engine). > >> The third line made by copying and pasting the output from the output of >> the first line. Looks like J is doing a translation from the old box >> characters to the unicode box characters. What would happen if the unicode >> characters were displayed directly instead of using the 9!:6 '' numbers? >> And maybe it would be nice to allow unicode values for 9!:7 so one could >> use rounded corners or other unicode box characters if one wanted? > > As I tried to illustrate, above, I think it's the OS performing that > translation. > > And I do not know the specifics of 9!:7 - why it's currently > constrained to "ascii" characters. But I suspect it has something to > do with the specific characters being used for box drawing not being > unicode characters, and a lack of generically reliable unicode font > support for box characters. (Not that box drawing characters are > completely reliable as it is...) > > A related issue is that unicode is an open-ended standard so most of > its implementation probably belongs in user space. > > Another related issue is that "wchar" is "insufficiently wide" for > many unicode characters. > > -- > Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
