[Jprogramming] Boxing Unicode (display)
Alex Giannakopoulos
aegean at blueyonder.co.uk
Fri May 9 09:49:11 UTC 2014
Thanks Ian, interesting thread.
Danylo, sbox _sort of_ works, if I insert a space between each character.
Messes up if there ARE spaces to display, though.
Still, that sets me on the right track, I'm sure I can figure a
workaround...
sbox cutopen 'κ υ ά μ ω ν α π έ χ ε σ θ α ι'
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|κ|υ|ά|μ|ω|ν|α|π|έ|χ|ε|σ|θ|α|ι|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Yay
On 9 May 2014 07:18, Danylo Lizanets <iamweasel at ukr.net> wrote:
> Use format/sbox from standard addons for correct Unicode box display.
>
>
> On Fri, May 9, 2014 at 4:21 AM, alexgian <alexgian at blueyonder.co.uk>
> wrote:
>
> > I imagine this has been discussed before, if so please feel free to point
> > me to relevant link.
> >
> > Suppose I have a unicode string - I can enter it directly at the
> terminal -
> > and I want to box it. E.g.
> >
> >
> > ;/ 7&u: 'κυάμων-απέχεσθαι'
> >
> > +--+--+--+--+--+--+-+--+--+--+--+--+--+--+--+--+
> >
> > |κ|υ|ά|μ|ω|ν|-|α|π|έ|χ|ε|σ|θ|α|ι|
> >
> > +--+--+--+--+--+--+-+--+--+--+--+--+--+--+--+--+
> >
> >
> > The J system recognizes the UTF coding, so the relevant space is is
> > reserved for each character - for instance you can see that the dash
> takes
> > only one space, whereas the Greek characters take two. However, the
> > display is clever enough to render the characters correctly, resulting in
> > the mismatch of the box offsets.
> >
> >
> > Is there a way around this? No huge deal if there isn't.
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
More information about the Programming
mailing list