J805 has improvements in the boxed display of utf-8.

Ascii chars such as * are encoded in 1 data byte and take 1 display space.

European chars such as á are encoded in 2 data bytes but take 1 one display
space.

CJK (Chinese/Japanese/Korean) chars such as 沒 are encoded in 3 data bytes
but take 2 display spaces.

The mismatch in data bytes vs display space caused boxed display in
previous releases to have misaligned vertical bars.

J805 does a better job of aligning vertical bars in many cases. It takes
into account that some utf-8 sequences take 1 display space and that others
take 2 display spaces.

European chars are a simpler problem and are supported by most modern fixed
pitch fonts.

CJK chars are more complicated and most fixed pitch fonts don't properly
display them in 2 display spaces so the J boxed display calculations still
won't align the vertical bars.

unifont is a popular fixed pitch font that will work with J boxed CJK
display. For Windows and Mac download and install the standard unifont ttf
from: http://unifoundry.com/unifont.html
For linux, use apt-get (or similar commands) to install unifont from distro
repos.

On your new 805 install try:
   <'áèäç'          NB. should display properly with most fixed pitch fonts
   <'沒有問題'    NB. should display properly with unifont - be sure unifont is
the font that is used

Pleasing boxed display depends on valid utf-8 sequences in the unicode
ranges that are handled. For example, unicode chars that require 3 display
spaces or are not supported in unifont will not have aligned vertical bars.

Windows console and powershell do not support unicode and instead use
codepages. Does anyone know how to get windows console or powershell to
work with utf-8 instead of codepages?

JHS does not currently have an easy way to specify the use of unifont.
Following steps will let you play with unifont in JHS:
   f=. '~addons/ide/jhs/jijx.ijs'
   d=. fread f
   (d rplc 'courier new';'unifont')fwrite f
   load f
   NB. press f5 to refresh the ijx page

***
Documentation similar to the above will eventually be incorporated into the
general docs, but this should be enough to get started with now if you are
interested in these issues.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to