Jsoftware
High-Performance Development Platform

How to see non-ascii characters in Session Manager?

View: New views
13 Messages — Rating Filter:   Alert me  

How to see non-ascii characters in Session Manager?

by Yuvaraj A R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

WinXP; J602

test file: j602\system\extras\config\colorsmp.ijs

I have a brand new machine on which I want to get back all the J software
settings I am used to.

When I open test file in J session manager, I see boxes for non-ascii
characters. The same behavior is observed when I open test file with
Notepad.
When I open test file in Wordpad, I see some representation for the
non-ascii characters.

Since I work with binary strings, the boxes do not help me when I try to
debug.  What should I do to get the non-ascii characters represented other
than boxes in the J Session Manager to allow for some visual debugging
clues?

Thanks,
Yuva
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Dan Bron :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yuvaraj Athur Raghuvir asked:
>  What should I do to get the non-ascii characters represented other
>  than boxes in the J Session Manager to allow for some visual debugging
>  clues?

You'll need to install a font that provides glyphs for these characters.  Then you need to configure the Session Manager to use this font.  

  1.  To see what font you were using on your old machine, go to Edit>Configure>Display and look in the Display Font field.
  2.  Install this font on your new machine (if it isn't already).
  3.  Copy the contents of the Display Font field from the old machine into the same field on the new machine.

There is some old APL font out there that has both box-drawing chars and glyphs for control characters, like

   ASCII #     GLYPH
   -------     -----
         0      N
                 U
                  L

         1      S
                 O
                  H

        12       F
                  F

But I can't find it now.


-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Yuvaraj A R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks.

Digging around, I found a better way to phrase my question:

"how to display the non-printable (e.g. characters with ASCII values less
than 32 or greater than 127) as distinct symbols instead of small rectangles
that are indistinguishable?"

I used standard fonts like Courier/Courier New  for the display and nothing
specially installed for J.

What confuses me is that Wordpad is able to substitute something using
Courier New while NotePad (and hence J's Session Manager?) is not able to do
so. Probably goes back all the way to the type of edit control that is used
here.

Any clues?

Yuva



On Tue, Jun 24, 2008 at 1:53 PM, Dan Bron <j@...> wrote:

> Yuvaraj Athur Raghuvir asked:
> >  What should I do to get the non-ascii characters represented other
> >  than boxes in the J Session Manager to allow for some visual debugging
> >  clues?
>
> You'll need to install a font that provides glyphs for these characters.
>  Then you need to configure the Session Manager to use this font.
>
>  1.  To see what font you were using on your old machine, go to
> Edit>Configure>Display and look in the Display Font field.
>  2.  Install this font on your new machine (if it isn't already).
>  3.  Copy the contents of the Display Font field from the old machine into
> the same field on the new machine.
>
> There is some old APL font out there that has both box-drawing chars and
> glyphs for control characters, like
>
>   ASCII #     GLYPH
>   -------     -----
>         0      N
>                 U
>                  L
>
>         1      S
>                 O
>                  H
>
>        12       F
>                  F
>
> But I can't find it now.
>
>
> -Dan
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Dan Bron :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yuvaraj Athur Raghuvir wrote:
> What confuses me is that Wordpad is able to substitute something using
> Courier New while NotePad (and hence J's Session Manager?) is not able to do
> so. Probably goes back all the way to the type of edit control that is used
> here.

I thought your goal was to port your entire J environment from your old machine to your new.  With that in mind, on your old machine, when you open a J Session Manager and type  a. #~ 1 ~: 32 127 I. i.#a.  , what do you see?  

If you don't see small rectangles, then can you check your Edit>Configure>Display>Display Font field?  If it says "Courier" or "Courier New" and you're seeing distinguishable glyphs instead of small rectangles, then I am very surprised.  What else is different between the two machines?

If you do see small rectangles, then the old machine/new machine situation is just cirumstantial, and your question is just as you put it:

> "how to display the non-printable (e.g. characters with ASCII values less
> than 32 or greater than 127) as distinct symbols instead of small rectangles
> that are indistinguishable?"

The only way I'm aware of for the Session Manager to display distinguishable ASCII control characters is when it is configured to use a font which includes glyphs for them.  I don't know what WordPad is doing for you, but it's not doing it for me.  That is, if execute this J sentence:

     a. fwrite 'C:\a.txt'

and then open  C:\a.txt  with wordpad and select Courier as my font, the only distinguishable characters are the printable characters (aptly named!).  The control characters are all rendered as indistinguishable rectangles (including the box drawing characters).  I'm running on XP SP 3.

I'm sorry I can't be more help.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Oleg Kobchenko :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Maybe you just need

   load'format'
   hexdump a.{~i:48
00  D0 D1 D2 D3-D4 D5 D6 D7  D8 D9 DA DB-DC DD DE DF  |................|
10  E0 E1 E2 E3-E4 E5 E6 E7  E8 E9 EA EB-EC ED EE EF  |................|
20  F0 F1 F2 F3-F4 F5 F6 F7  F8 F9 FA FB-FC FD FE FF  |................|
30  00 01 02 03-04 05 06 07  08 09 0A 0B-0C 0D 0E 0F  |... .|
40  10 11 12 13-14 15 16 17  18 19 1A 1B-1C 1D 1E 1F  |┌┬┐├┼┤└┴┘│─|
50  20 21 22 23-24 25 26 27  28 29 2A 2B-2C 2D 2E 2F  | !"#$%&'()*+,-./|
60  30                                                |0               |


--- On Tue, 6/24/08, Yuvaraj Athur Raghuvir <yuvaraj.a.r@...> wrote:

> Thanks.
>
> Digging around, I found a better way to phrase my question:
>
> "how to display the non-printable (e.g. characters
> with ASCII values less
> than 32 or greater than 127) as distinct symbols instead of
> small rectangles
> that are indistinguishable?"
>
> I used standard fonts like Courier/Courier New  for the
> display and nothing
> specially installed for J.
>
> What confuses me is that Wordpad is able to substitute
> something using
> Courier New while NotePad (and hence J's Session
> Manager?) is not able to do
> so. Probably goes back all the way to the type of edit
> control that is used
> here.
>
> Any clues?
>
> Yuva
>
>
>
> On Tue, Jun 24, 2008 at 1:53 PM, Dan Bron <j@...>
> wrote:
>
> > Yuvaraj Athur Raghuvir asked:
> > >  What should I do to get the non-ascii characters
> represented other
> > >  than boxes in the J Session Manager to allow for
> some visual debugging
> > >  clues?
> >
> > You'll need to install a font that provides glyphs
> for these characters.
> >  Then you need to configure the Session Manager to use
> this font.
> >
> >  1.  To see what font you were using on your old
> machine, go to
> > Edit>Configure>Display and look in the Display
> Font field.
> >  2.  Install this font on your new machine (if it
> isn't already).
> >  3.  Copy the contents of the Display Font field from
> the old machine into
> > the same field on the new machine.
> >
> > There is some old APL font out there that has both
> box-drawing chars and
> > glyphs for control characters, like
> >
> >   ASCII #     GLYPH
> >   -------     -----
> >         0      N
> >                 U
> >                  L
> >
> >         1      S
> >                 O
> >                  H
> >
> >        12       F
> >                  F
> >
> > But I can't find it now.
> >
> >
> > -Dan
> >
> >
> ----------------------------------------------------------------------
> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Yuvaraj A R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hmm....

1) Did you try opening j602\system\extras\config\colorsmp.ijs with notepad
and wordpad? Do you see the difference in the rendering of Line No 16? Is
this because notepad is unable to recognize unicode?

2) Unfortunately, I donot have access to my old machine anymore. So, what I
writing is from what I remember as having seen. All that you have said below
works as you described in my new machine.

Ok, when I pass messages over the socket, I use binary translation for the
size of the message. In my previous machine, I was able to see some
representation of the data and was able to spot errors. Now, with these nice
small rectangles, I am clueless. Of course, I can always pretty print by
decoding. I was just hoping that there was a simpler way....

Thanks,
Yuva


On Tue, Jun 24, 2008 at 2:30 PM, Dan Bron <j@...> wrote:

> Yuvaraj Athur Raghuvir wrote:
> > What confuses me is that Wordpad is able to substitute something using
> > Courier New while NotePad (and hence J's Session Manager?) is not able to
> do
> > so. Probably goes back all the way to the type of edit control that is
> used
> > here.
>
> I thought your goal was to port your entire J environment from your old
> machine to your new.  With that in mind, on your old machine, when you open
> a J Session Manager and type  a. #~ 1 ~: 32 127 I. i.#a.  , what do you see?
>
> If you don't see small rectangles, then can you check your
> Edit>Configure>Display>Display Font field?  If it says "Courier" or "Courier
> New" and you're seeing distinguishable glyphs instead of small rectangles,
> then I am very surprised.  What else is different between the two machines?
>
> If you do see small rectangles, then the old machine/new machine situation
> is just cirumstantial, and your question is just as you put it:
>
> > "how to display the non-printable (e.g. characters with ASCII values less
> > than 32 or greater than 127) as distinct symbols instead of small
> rectangles
> > that are indistinguishable?"
>
> The only way I'm aware of for the Session Manager to display
> distinguishable ASCII control characters is when it is configured to use a
> font which includes glyphs for them.  I don't know what WordPad is doing for
> you, but it's not doing it for me.  That is, if execute this J sentence:
>
>     a. fwrite 'C:\a.txt'
>
> and then open  C:\a.txt  with wordpad and select Courier as my font, the
> only distinguishable characters are the printable characters (aptly named!).
>  The control characters are all rendered as indistinguishable rectangles
> (including the box drawing characters).  I'm running on XP SP 3.
>
> I'm sorry I can't be more help.
>
> -Dan
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Chris Burke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It is not clear to me exactly what the problem is. What version of J was
your previous system? What is your binary data? Anyway, the following
may help - if not, please give us more details of what you want to do.

The J6 session assumes that literal text (3!:0 is 2) is in utf8 format.
If the text to be displayed is correct utf8, you should see the
characters properly, as long as the font used supports each character.
If the text is not correct utf8, you will see boxes (or other garbage
characters). Note, earlier versions of J did not support utf8. Also, the
point is "not utf8" rather than "not ascii".

The script 'system\extras\config\colorsmp.ijs' is in utf8 format, and
should be displayed correctly by the J6 session, and by any editor that
can detect and display utf8. For some editors, you may need to
explicitly set utf8 as the encoding.

In general, binary data is not in utf8 format, and so will display as
garbage. As Oleg suggests, you can use the hexdump facility to display
binary data, with characters shown only where possible.

Yuvaraj Athur Raghuvir wrote:

> 1) Did you try opening j602\system\extras\config\colorsmp.ijs with notepad
> and wordpad? Do you see the difference in the rendering of Line No 16? Is
> this because notepad is unable to recognize unicode?
>
> 2) Unfortunately, I donot have access to my old machine anymore. So, what I
> writing is from what I remember as having seen. All that you have said below
> works as you described in my new machine.
>
> Ok, when I pass messages over the socket, I use binary translation for the
> size of the message. In my previous machine, I was able to see some
> representation of the data and was able to spot errors. Now, with these nice
> small rectangles, I am clueless. Of course, I can always pretty print by
> decoding. I was just hoping that there was a simpler way....

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

RE: How to see non-ascii characters in Session Manager?

by Dan Bron :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yuvaraj Athur Raghuvir wrote:

> 1) Did you try opening j602\system\extras\config\colorsmp.ijs
> with notepad and wordpad? Do you see the difference in the
> rendering of Line No 16? Is this because notepad is unable to
> recognize unicode?

Ah, now I understand.  I just tried this experiment, and I reproduced your results:  the characters in Wordpad were slightly more
distinguishable than in Notepad.  In particular, Asian characters were still all featureless rectangles, but the Latin-like
letters were not.  They were rendered as other (still incorrect) glyphs.  

I think the issue is that neither Notepad nor Wordpad recognize that the file is UTF8.  Notepad believe it's ASCII, and renders
all non-printable-ASCII characters the same way (with that rectangle).

Wordpad believes it's some legacy (non-Unicode) international encoding (aka "extended ASCII").

I (think) this conclusion is borne out by a further experiment.  I prepended the UTF8 BOM to the file and opened it in Notepad and
Wordpad again.  Notepad, like before, rendered all unknown characters as rectangles.  But Wordpad rendered all the Unicode
characters properly. Even after I explictly set the font to "Courier New" the foreign characters were still rendered properly
(I'm surprised; I didn't think Courier had those chars.  And I'm pretty sure it WAS Courier; at least the chars looked
monospaced).

For what it's worth,

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Yuvaraj A R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok, this is what I have:

   ic=: 3!:4
   endian=. a. i. {. 1 ic 1
   (endian,0 0 0) { a.

   (endian,1 0 0) { a.

   (endian,2 0 0) { a.

   (endian,3 0 0) { a.


I would like to see these binary forms explicitly in the J Session Manager.
I remember seeing them as such (some strange symbols but distinguishable).

I used J602 earlier. And am using J602 now. So, I my first guess was that
something is different in the windows gui controls on this laptop of mine.

I use this in the following ways:
RESPONSE=: (endian,3 0 0) { a.
a =. cmdr__o 'Mcmdcount__theObj'  NB. this is a command send over a socket
and receives the data with a header that describes the data
I can then splice the message as follows:
   splice a
+----+-+------+++
|  |6|582396|||
+----+-+------+++
and compare the header as so
   RESPONSE -: (> 0 {  splice a)
1

Does this make my problem clear : I would like to see the various binary
forms distinguished in the J Session Manager. I am using Courier New font.
Is there any (OS) system setting that can help me here?

~Yuva



On Tue, Jun 24, 2008 at 5:43 PM, Chris Burke <cburke@...> wrote:

> It is not clear to me exactly what the problem is. What version of J was
> your previous system? What is your binary data? Anyway, the following
> may help - if not, please give us more details of what you want to do.
>
> The J6 session assumes that literal text (3!:0 is 2) is in utf8 format.
> If the text to be displayed is correct utf8, you should see the
> characters properly, as long as the font used supports each character.
> If the text is not correct utf8, you will see boxes (or other garbage
> characters). Note, earlier versions of J did not support utf8. Also, the
> point is "not utf8" rather than "not ascii".
>
> The script 'system\extras\config\colorsmp.ijs' is in utf8 format, and
> should be displayed correctly by the J6 session, and by any editor that
> can detect and display utf8. For some editors, you may need to
> explicitly set utf8 as the encoding.
>
> In general, binary data is not in utf8 format, and so will display as
> garbage. As Oleg suggests, you can use the hexdump facility to display
> binary data, with characters shown only where possible.
>
> Yuvaraj Athur Raghuvir wrote:
> > 1) Did you try opening j602\system\extras\config\colorsmp.ijs with
> notepad
> > and wordpad? Do you see the difference in the rendering of Line No 16? Is
> > this because notepad is unable to recognize unicode?
> >
> > 2) Unfortunately, I donot have access to my old machine anymore. So, what
> I
> > writing is from what I remember as having seen. All that you have said
> below
> > works as you described in my new machine.
> >
> > Ok, when I pass messages over the socket, I use binary translation for
> the
> > size of the message. In my previous machine, I was able to see some
> > representation of the data and was able to spot errors. Now, with these
> nice
> > small rectangles, I am clueless. Of course, I can always pretty print by
> > decoding. I was just hoping that there was a simpler way....
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by bill lam-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Your problem is not related to J, and that your example only
display data below 127{a. so that it is not related to utf-8 either.
Since J does not have special handling for non-displayable character,
how to display them is controlled by os (or java for java-frontend).

You can do some pre-processing, eg. there is a pdfesc in plot package

    pdfesc_jzplot_"1[ _16]\a.
\000\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017
\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037
  !"#$%&'\(\)*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~\177
\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217
\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237
\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257
\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277
\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317
\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337
\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357
\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377

Yuvaraj Athur Raghuvir wrote:

> Ok, this is what I have:
>
>    ic=: 3!:4
>    endian=. a. i. {. 1 ic 1
>    (endian,0 0 0) { a.
> 
>    (endian,1 0 0) { a.
> 
>    (endian,2 0 0) { a.
> 
>    (endian,3 0 0) { a.
> 
>
> I would like to see these binary forms explicitly in the J Session Manager.
> I remember seeing them as such (some strange symbols but distinguishable).
>
> I used J602 earlier. And am using J602 now. So, I my first guess was that
> something is different in the windows gui controls on this laptop of mine.
>
> I use this in the following ways:
> RESPONSE=: (endian,3 0 0) { a.
> a =. cmdr__o 'Mcmdcount__theObj'  NB. this is a command send over a socket
> and receives the data with a header that describes the data
> I can then splice the message as follows:
>    splice a
> +----+-+------+++
> |  |6|582396|||
> +----+-+------+++
> and compare the header as so
>    RESPONSE -: (> 0 {  splice a)
> 1
>
> Does this make my problem clear : I would like to see the various binary
> forms distinguished in the J Session Manager. I am using Courier New font.
> Is there any (OS) system setting that can help me here?
>
> ~Yuva
>
>
>
> On Tue, Jun 24, 2008 at 5:43 PM, Chris Burke <cburke@...> wrote:
>
>> It is not clear to me exactly what the problem is. What version of J was
>> your previous system? What is your binary data? Anyway, the following
>> may help - if not, please give us more details of what you want to do.
>>
>> The J6 session assumes that literal text (3!:0 is 2) is in utf8 format.
>> If the text to be displayed is correct utf8, you should see the
>> characters properly, as long as the font used supports each character.
>> If the text is not correct utf8, you will see boxes (or other garbage
>> characters). Note, earlier versions of J did not support utf8. Also, the
>> point is "not utf8" rather than "not ascii".
>>
>> The script 'system\extras\config\colorsmp.ijs' is in utf8 format, and
>> should be displayed correctly by the J6 session, and by any editor that
>> can detect and display utf8. For some editors, you may need to
>> explicitly set utf8 as the encoding.
>>
>> In general, binary data is not in utf8 format, and so will display as
>> garbage. As Oleg suggests, you can use the hexdump facility to display
>> binary data, with characters shown only where possible.
>>
>> Yuvaraj Athur Raghuvir wrote:
>>> 1) Did you try opening j602\system\extras\config\colorsmp.ijs with
>> notepad
>>> and wordpad? Do you see the difference in the rendering of Line No 16? Is
>>> this because notepad is unable to recognize unicode?
>>>
>>> 2) Unfortunately, I donot have access to my old machine anymore. So, what
>> I
>>> writing is from what I remember as having seen. All that you have said
>> below
>>> works as you described in my new machine.
>>>
>>> Ok, when I pass messages over the socket, I use binary translation for
>> the
>>> size of the message. In my previous machine, I was able to see some
>>> representation of the data and was able to spot errors. Now, with these
>> nice
>>> small rectangles, I am clueless. Of course, I can always pretty print by
>>> decoding. I was just hoping that there was a simpler way....
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Chris Burke :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yuvaraj Athur Raghuvir wrote:

> Ok, this is what I have:
>
>    ic=: 3!:4
>    endian=. a. i. {. 1 ic 1
>    (endian,0 0 0) { a.
> 
>    (endian,1 0 0) { a.
> 
>    (endian,2 0 0) { a.
> 
>    (endian,3 0 0) { a.
> 
>
> I would like to see these binary forms explicitly in the J Session Manager.
> I remember seeing them as such (some strange symbols but distinguishable).
>
> I used J602 earlier. And am using J602 now. So, I my first guess was that
> something is different in the windows gui controls on this laptop of mine.
>
> I use this in the following ways:
> RESPONSE=: (endian,3 0 0) { a.
> a =. cmdr__o 'Mcmdcount__theObj'  NB. this is a command send over a socket
> and receives the data with a header that describes the data
> I can then splice the message as follows:
>    splice a
> +----+-+------+++
> |  |6|582396|||
> +----+-+------+++
> and compare the header as so
>    RESPONSE -: (> 0 {  splice a)
> 1
>
> Does this make my problem clear : I would like to see the various binary
> forms distinguished in the J Session Manager. I am using Courier New font.
> Is there any (OS) system setting that can help me here?

These examples use the first 4 bytes, i.e. 4 {. a. . These are not
proper text anyway, since that begins at character 32. The first block
of normal text characters is (32+i.95) { a. .

How 4 {. a. displays depends on the font used, and you need to
experiment with fonts to find one that behaves as in your old system. It
may be better to avoid trying to view such characters, and instead
convert them into numbers for viewing.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Re: How to see non-ascii characters in Session Manager?

by Yuvaraj A R :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Any clues on what settings on the OS level can help?

BTW, does anyone else see anything other than small rectangles for this data?

~Yuva



On 6/24/08, bill lam <bbill.lam@...> wrote:

> Your problem is not related to J, and that your example only
> display data below 127{a. so that it is not related to utf-8 either.
> Since J does not have special handling for non-displayable character,
> how to display them is controlled by os (or java for java-frontend).
>
> You can do some pre-processing, eg. there is a pdfesc in plot package
>
>     pdfesc_jzplot_"1[ _16]\a.
> \000\001\002\003\004\005\006\007\b\t\n\013\f\r\016\017
> \020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037
>   !"#$%&'\(\)*+,-./
> 0123456789:;<=>?
> @ABCDEFGHIJKLMNO
> PQRSTUVWXYZ[\\]^_
> `abcdefghijklmno
> pqrstuvwxyz{|}~\177
> \200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217
> \220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237
> \240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257
> \260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277
> \300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317
> \320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337
> \340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357
> \360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377
>
> Yuvaraj Athur Raghuvir wrote:
>> Ok, this is what I have:
>>
>>    ic=: 3!:4
>>    endian=. a. i. {. 1 ic 1
>>    (endian,0 0 0) { a.
>>
>>    (endian,1 0 0) { a.
>>
>>    (endian,2 0 0) { a.
>>
>>    (endian,3 0 0) { a.
>>
>>
>> I would like to see these binary forms explicitly in the J Session
>> Manager.
>> I remember seeing them as such (some strange symbols but distinguishable).
>>
>> I used J602 earlier. And am using J602 now. So, I my first guess was that
>> something is different in the windows gui controls on this laptop of mine.
>>
>> I use this in the following ways:
>> RESPONSE=: (endian,3 0 0) { a.
>> a =. cmdr__o 'Mcmdcount__theObj'  NB. this is a command send over a socket
>> and receives the data with a header that describes the data
>> I can then splice the message as follows:
>>    splice a
>> +----+-+------+++
>> |    |6|582396|||
>> +----+-+------+++
>> and compare the header as so
>>    RESPONSE -: (> 0 {  splice a)
>> 1
>>
>> Does this make my problem clear : I would like to see the various binary
>> forms distinguished in the J Session Manager. I am using Courier New font.
>> Is there any (OS) system setting that can help me here?
>>
>> ~Yuva
>>
>>
>>
>> On Tue, Jun 24, 2008 at 5:43 PM, Chris Burke <cburke@...> wrote:
>>
>>> It is not clear to me exactly what the problem is. What version of J was
>>> your previous system? What is your binary data? Anyway, the following
>>> may help - if not, please give us more details of what you want to do.
>>>
>>> The J6 session assumes that literal text (3!:0 is 2) is in utf8 format.
>>> If the text to be displayed is correct utf8, you should see the
>>> characters properly, as long as the font used supports each character.
>>> If the text is not correct utf8, you will see boxes (or other garbage
>>> characters). Note, earlier versions of J did not support utf8. Also, the
>>> point is "not utf8" rather than "not ascii".
>>>
>>> The script 'system\extras\config\colorsmp.ijs' is in utf8 format, and
>>> should be displayed correctly by the J6 session, and by any editor that
>>> can detect and display utf8. For some editors, you may need to
>>> explicitly set utf8 as the encoding.
>>>
>>> In general, binary data is not in utf8 format, and so will display as
>>> garbage. As Oleg suggests, you can use the hexdump facility to display
>>> binary data, with characters shown only where possible.
>>>
>>> Yuvaraj Athur Raghuvir wrote:
>>>> 1) Did you try opening j602\system\extras\config\colorsmp.ijs with
>>> notepad
>>>> and wordpad? Do you see the difference in the rendering of Line No 16?
>>>> Is
>>>> this because notepad is unable to recognize unicode?
>>>>
>>>> 2) Unfortunately, I donot have access to my old machine anymore. So,
>>>> what
>>> I
>>>> writing is from what I remember as having seen. All that you have said
>>> below
>>>> works as you described in my new machine.
>>>>
>>>> Ok, when I pass messages over the socket, I use binary translation for
>>> the
>>>> size of the message. In my previous machine, I was able to see some
>>>> representation of the data and was able to spot errors. Now, with these
>>> nice
>>>> small rectangles, I am clueless. Of course, I can always pretty print by
>>>> decoding. I was just hoping that there was a simpler way....
>>> ----------------------------------------------------------------------
>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>

--
Sent from Gmail for mobile | mobile.google.com
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

RE: How to see non-ascii characters in Session Manager?

by Fred Bone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 24 June 2008 at 21:33, Dan Bron said:

> Yuvaraj Athur Raghuvir wrote:
>
> > 1) Did you try opening j602\system\extras\config\colorsmp.ijs
> > with notepad and wordpad? Do you see the difference in the
> > rendering of Line No 16? Is this because notepad is unable to
> > recognize unicode?
>
> Ah, now I understand.  I just tried this experiment, and I reproduced your
> results:  the characters in Wordpad were slightly more distinguishable
> than in Notepad.  In particular, Asian characters were still all
> featureless rectangles, but the Latin-like letters were not.  They were
> rendered as other (still incorrect) glyphs.  
>
> I think the issue is that neither Notepad nor Wordpad recognize that the
> file is UTF8.  Notepad believe it's ASCII, and renders all
> non-printable-ASCII characters the same way (with that rectangle).
>
> Wordpad believes it's some legacy (non-Unicode) international encoding
> (aka "extended ASCII").
>
> I (think) this conclusion is borne out by a further experiment.  I
> prepended the UTF8 BOM to the file and opened it in Notepad and Wordpad
> again.  Notepad, like before, rendered all unknown characters as
> rectangles.  But Wordpad rendered all the Unicode characters
> properly. Even after I explictly set the font to "Courier New" the foreign
> characters were still rendered properly (I'm surprised; I didn't think
> Courier had those chars.  And I'm pretty sure it WAS Courier; at least the
> chars looked monospaced).

Courier doesn't. Courier New (a different font, with glyphs differently
proportioned) does. Take a look using Charmap.


----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
LightInTheBox - Buy quality products at wholesale price