Hi all,
I updated the wiki to include some verbs that will take literal, unicode,
unicode4 or integer types (including 1 and 0 as binary) and return valid
Unicode code point.
https://code.jsoftware.com/wiki/Vocabulary/UnicodeCodePoint#Verbs_to_convert_literal.2C_unicode_and_unicode4_encodings_
, 2017 07:34 PM
Subject: Re: [Jprogramming] unicode
8{a. is non-printable, it's
display in J session is platform dependent. Try use Unicode instead, it will
work everywhere. Use jandroid, switch the keyboard input to Emoji and pick cute
icons that you like. E.g.
(9&u:' 🍔
> Sent: Sat, Oct 21, 2017 07:34 PM
> Subject: Re: [Jprogramming] unicode
>
>
>
>
> 8{a. is non-printable, it's
> display in J session is platform dependent. Try use Unicode instead, it will
> work everywhere. Use jandroid, switch the keyboard input to Emoji and pic
gramming forum ; Roger Hui <
> rogerhui.can...@gmail.com>
> Sent: Sat, Oct 21, 2017 07:34 PM
> Subject: Re: [Jprogramming] unicode
>
>
> 8{a. is non-printable, it's display in J session is platform dependent.
> Try use Unicode instead, it will work everywhere. Use jandroid,
Sent from AOL Mobile Mail
Did you try my original version o a laptop in jqt?
-Original Message-
From: bill lam
To: Linda Alvord
Cc: Programming forum ; Roger Hui
Sent: Sat, Oct 21, 2017 07:34 PM
Subject: Re: [Jprogramming] unicode
8{a. is non-printable, it's
display
> for android?
>
> A=:(i:5)>:/_5+|i:5
>
> (32 8{a.){~A
>
>
> Linda
>
> Sent from AOL Mobile Mail
>
>
> -Original Message-
> From: bill lam
> To: Linda Alvord
> Cc: Programming forum ; Roger Hui <
> rogerhui.can...@gmail.com>
>
ject: Re: [Jprogramming] unicode
Try(9&u:'🐷🐰'){~2|+/~i.8
On Oct 20, 2017 11:28 PM, "Linda Alvord" <mailto:lindaalv...@verizon.net";>lindaalv...@verizon.net> wrote:
This gets to the heart of the problem! An addition table. Then, finding what's
left w
Cute. Ithought the cats were butterflies until I changed the font size to 72.
Linda
From: bill lam [mailto:bbill@gmail.com]
Sent: Friday, October 20, 2017 11:43 AM
To: Linda Alvord
Cc: Programming forum ; Roger Hui
Subject: Re: [Jprogramming] unicode
Try
(9&u:'
Cute! I thought the dat was a butterfly until I used to fontsize 72.
Linda
Sent from AOL Mobile Mail
-Original Message-
From: bill lam
To: Linda Alvord
Cc: Programming forum ; Roger Hui
Sent: Fri, Oct 20, 2017 11:42 AM
Subject: Re: [Jprogramming] unicode
Try(9&u:'
> $d
>
> 8 8
>
> Linda -Original Message-
> From: Linda Alvord
> To: lindaalvord ; bbill.lam ;
> programming
> Sent: Thu, Oct 19, 2017 05:21 AM
> Subject: Re: [Jprogramming] unicode
>
>
>
>
> J for kindergarten.
> b=:'♡♤♧◇'
>
>
>
ing
>> >> what's left when you divide numbers in half.
>> >>
>> >> Now, picking your symbols should be fun.
>> >> It seems like a good day in kindergarden.
>> >>
>> >> Linda
>> >>
>> >> Sent from AOL Mobile Mail
>>
pretty neat!
On 20 Oct 2017 15:02, "Roger Hui" wrote:
>2|+/~i.8
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
>
>'.X'{~2|+/~i.8
> .X.X.X.X
> X.X.X.X.
> .X.X.X.X
> X.X.X.X.
> .X.X.X.X
> X.X.X
om: Roger Hui
>> To: Programming forum >> Cc: Linda Alvord
; bill lam >> Sent: Fri, Oct 20,
2017 11:02 AM >> Subject: Re: [Jprogramming] unicode >> >> >> 2|+/~i.8 >> 0 1 0
1 0 1 0 1 >> 1 0 1 0 1 0 1 0 >> 0 1 0 1 0 1 0 1 >> 1 0 1 0
t; It seems like a good day in kindergarden.
> >>
> >> Linda
> >>
> >> Sent from AOL Mobile Mail
> >>
> >>
> >> -Original Message-
> >> From: Roger Hui
> >> To: Programming forum
> >> Cc: Linda Alvord ; bi
s like a good day in kindergarden.
>>
>> Linda
>>
>> Sent from AOL Mobile Mail
>>
>>
>> -Original Message-
>> From: Roger Hui
>> To: Programming forum
>> Cc: Linda Alvord ; bill lam
>> Sent: Fri, Oct 20, 2017 11:02 AM
>&g
> Cc: Linda Alvord ; bill lam
> Sent: Fri, Oct 20, 2017 11:02 AM
> Subject: Re: [Jprogramming] unicode
>
>
>2|+/~i.8
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1 0 1 0
> 0 1 0 1 0 1 0 1
> 1 0 1 0 1
.
> It seems like a good day in kindergarden.
>
> Linda
>
> Sent from AOL Mobile Mail
>
>
> -Original Message-
> From: Roger Hui
> To: Programming forum
> Cc: Linda Alvord ; bill lam
> Sent: Fri, Oct 20, 2017 11:02 AM
> Subject: Re: [Jprogramming] unicode
>
i
To: Programming forum
Cc: Linda Alvord ; bill lam
Sent: Fri, Oct 20, 2017 11:02 AM
Subject: Re: [Jprogramming] unicode
2|+/~i.80 1
0 1 0 1 0 11 0 1 0 1 0 1 00 1 0 1 0 1 0 11 0 1 0 1 0 1 00 1 0 1 0 1 0 11 0 1 0 1 0 1 00 1 0 1 0 1 0 11 0 1 0 1 0 1 0
'.X'{~2|+/~i.8.X.X.X.XX.X.X.X.
2|+/~i.8
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0
'.X'{~2|+/~i.8
.X.X.X.X
X.X.X.X.
.X.X.X.X
X.X.X.X.
.X.X.X.X
X.X.X.X.
.X.X.X.X
X.X.X.X.
On Fri, Oct 20, 2017 at 1:03 AM, Linda Alvord
wrote:
>
>
> Sent
board?
> d
> ▪¤▪¤▪¤▪¤
> ¤▪¤▪¤▪¤▪
>
> ▪¤▪¤▪¤▪¤
>
> ¤▪¤▪¤▪¤▪
>
> ▪¤▪¤▪¤▪¤
>
> ¤▪¤▪¤▪¤▪
>
> ▪¤▪¤▪¤▪¤
>
> ¤▪¤▪¤▪¤▪
>
>$d
>
> 8 8
>
> Linda -Original Message-
> From: Linda Alvord
> To: lindaalvord ; bbi
Subject: Re: [Jprogramming] unicode
J for kindergarten.
b=:'♡♤♧◇'
]u32=:7 7$9&u: b
♡♤♧◇♡♤♧
◇♡♤♧◇♡♤
♧◇♡♤♧◇♡
♤♧◇♡♤♧◇
♡♤♧◇♡♤♧
◇♡♤♧◇♡♤
♧◇♡♤♧◇
Linda
Sent from AOL Mobile Mail
On Thursday,
October 19, 2017 Linda Alvord <mailto:lindaalv...@verizon.net";>lindaa
ftware.com wrote:
> Date: Wed, 18 Oct 2017 13:44:43 -0400
> From: Jimmy Gauvin
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] unicode
> Message-ID:
>
> Content-Type: text/plain; charset="UTF-8"
>
> Hi,
>
> workin
J for kindergarten.
b=:'♡♤♧◇'
]u32=:7 7$9&u: b
♡♤♧◇♡♤♧
◇♡♤♧◇♡♤
♧◇♡♤♧◇♡
♤♧◇♡♤♧◇
♡♤♧◇♡♤♧
◇♡♤♧◇♡♤
♧◇♡♤♧◇
Linda
Sent from AOL Mobile Mail
On Thursday, October 19, 2017 Linda Alvord wrote:
It's better if l turn on light.
a=:'⚃⚃⚂come ⚄⚅'
]u16=:7&u: a
]u32=:9&u: a
Linda
Sent from AOL
It's better if l turn on light.
a=:'⚃⚃⚂come ⚄⚅'
]u16=:7&u: a
]u32=:9&u: a
Linda
Sent from AOL Mobile Mail
On Thursday, October 19, 2017 Linda Alvord wrote:
a=:'⚃⚃⚂come ,⚄⚄'
]u16=:7&u: a
]u32= :9&u: a
Linda
Sent from AOL Mobile Mail
On Wednesday, October 18, 2017 bill lam wrote:
For th
a=:'⚃⚃⚂come ,⚄⚄'
]u16=:7&u: a
]u32= :9&u: a
Linda
Sent from AOL Mobile Mail
On Wednesday, October 18, 2017 bill lam wrote:
For this kind of operation, it should convert to utf16 or utf32 where each atom
stands for one unicode codepoint NB. utf8 a=:'鼠牛虎兔龍蛇馬羊猴鸡狗豬' NB. utf16 u16=:
7&u: a NB. ut
For this kind of operation, it should convert to
utf16 or utf32 where each atom stands for one unicode
codepoint
NB. utf8
a=:'鼠牛虎兔龍蛇馬羊猴鸡狗豬'
NB. utf16
u16=: 7&u: a
NB. utf32
u32=: 9&u: a
Both #u16 and #u32 are 12, so that character operations
can retain our expected semantic.
utf8 is normally what
Lo and behold,conversions work too:
1 (3!:4) A
鼠牛虎兔龍蛇馬羊猴鸡狗豬
2 (3!:4) A
鼠牛虎兔龍蛇馬羊猴鸡狗豬
3 (3!:4) A
鼠牛虎兔龍蛇馬羊猴鸡狗豬
> >> On Wed, Oct 18, 2017 at 1:46 PM, robert therriault
> >> wrote:
> >> >
> >> > Hi David,
> >> >
> >> > You can use {&a. to convert the encoded utf-8 into the characters
> >>
Oh sorry, A is not codepoint.
On Oct 19, 2017 3:15 AM, "bill lam" wrote:
> Will 7 u: A or 8 u: A work?
>
> On Oct 19, 2017 1:58 AM, "Raul Miller" wrote:
>
>> Or,
>>A{a.
>>
>>A{a.
>> 鼠牛虎兔龍蛇馬羊猴鸡狗豬
>>
>> I am not quite sure why u: does not handle A properly, but a
>> workaround there might
Will 7 u: A or 8 u: A work?
On Oct 19, 2017 1:58 AM, "Raul Miller" wrote:
> Or,
>A{a.
>
>A{a.
> 鼠牛虎兔龍蛇馬羊猴鸡狗豬
>
> I am not quite sure why u: does not handle A properly, but a
> workaround there might be to manually convert to utf-16 which u: will
> handle properly.
>
> For example:
>
> ut
Or,
A{a.
A{a.
鼠牛虎兔龍蛇馬羊猴鸡狗豬
I am not quite sure why u: does not handle A properly, but a
workaround there might be to manually convert to utf-16 which u: will
handle properly.
For example:
utf8to16=:3 :0
if. 'literal'-: datatype y do. y=.a.i.y end.
bits=.(8#2)#:y
r=.''
j=.0
while
Hi David,
You can use {&a. to convert the encoded utf-8 into the characters
A=: 16be9 16bbc 16ba0 16be7 16b89 16b9b 16be8 16b99 16b8e
A=:A,16be5 16b85 16b94 16be9 16bbe 16b8d 16be8 16b9b 16b87
A=: 16be9 16bbc 16ba0 16be7 16b89 16b9b 16be8 16b99 16b8e
A=:A,16be5 16b85 16b94 16be9
Hi,
working from the character representation a quick kludge is:
hx=:'\xe9\xbc\xa0\xe7\x89\x9b\xe8\x99\x8e\xe5\x85\x94\xe9\xbe\x8d\xe8\x9b\x87\xe9\xa6\xac\xe7\xbe\x8a\xe7\x8c\xb4\xe9\xb8\xa1\xe7\x8b\x97\xe8\xb1\xac'
a.{~,16 #."1 '0123456789abcdef' i. (,;._1);. _1 hx
鼠牛虎兔龍蛇馬羊猴鸡狗豬
On Wed
http://rosettacode.org/wiki/Chinese_zodiac
The following is supposed to contain strings which look like 12 Chinese
characters.
How in j to have the characters display correctly?
$ python3
Python 3.5.3 (default, Sep 14 2017, 22:58:41)
[GCC 6.3.0 20170406] on linux
Type "help", "copyright", "cr
It seems to me that the unicode characters will be difficult to display on
a window that assumes fixed width characters. When J is displayed in a
browser the boxing could be done using browser tools which can handle
unicode in boxes just fine. Perhaps there are some tools in Qt to handle
boxing als
Message -
From: robert therriault
To: programm...@jsoftware.com
Sent: Monday, July 4, 2016 3:27 PM
Subject: Re: [Jprogramming] Unicode (UTF8) string deconstruction
I have developed my enhanced view of shapes and types in J a bit further to
include unicode and utf8.
Video of the viewer is
I have developed my enhanced view of shapes and types in J a bit further to
include unicode and utf8.
Video of the viewer is available here https://youtu.be/eN9H-rMk1No and feedback
is welcomed.
Cheers, bob
> On Jun 17, 2016, at 8:54 PM, robert therriault wrote:
>
> Thanks Bill,
>
> If the
Thanks Bill,
If the utf8 is at most 3 bytes that takes a layer of checking out of my utf
verb.
utf_vts_
3 : 0"1
if. y-:'' do. return. end.
try. ((utf@:((1<.#)}.]));~((3 u: ":)@: (7 u: a.{~ (1<.#) {. ]))) y
catch. try. ((utf@:((2<.#)}.]));~((3 u: ":)@: (7 u: a.{~ (2<.#) {. ]))) y
cat
I see. But J can only handle unicode in bmp, ie codepoints below
65536, which are atmost 3 byte utf8.
u: 65536
|index error
| u:65536
Also the display width of a unicode character can vary from 0 to 2.
Пт, 17 июн 2016, robert therriault написал(а):
> Yes there are certainly illegal utf8
Yes there are certainly illegal utf8 characters in 8 6$ 'ఝ' ,'a','ఝ', but what
I am attempting is to reveal the illegal characters for what they are. Along
the lines
of the shape and type display that I had used incorporating svg. Once i have
that information
in a format that I can separate the i
But your s contains illegal utf8 characters.
isutf8=: 1:@(7&u:) ::0:
isutf8 'ఝ' ,'a','ఝ'
1
isutf8"1[ 8 6$ 'ఝ' ,'a','ఝ'
0 0 0 1 0 0 0 0
isutf8"1[ 8 7$ 'ఝ' ,'a','ఝ'
1 1 1 1 1 1 1 1
Since the 3 wide characters string is a 7 byte in utf8
a.i.'ఝ' ,'a','ఝ'
224 176 157 97 224 176 157
8 6 $
Thanks for all the suggestions everyone.
In the end I took a more explicit approach than I normally would, but it seems
to work.
I am not sure if this is useful for Henry, but it is one approach.
[s=. 8 6 $ 'ఝ' ,'a','ఝ'
ఝa��
�ఝa�
��ఝa
ఝఝ
aఝ��
�aఝ�
��aఝ
ఝa��
boxutf s
┌───┬─
internal representation of utf8 array is no different from regular
character array, utf8 only applies external interface. If you want to
manipulate unicode within j, you should use the wide character data type
(131072) as suggested by Don.
On Jun 17, 2016 2:33 AM, "robert therriault" wrote:
> You
-
From: robert therriault
To: programm...@jsoftware.com
Sent: Thursday, June 16, 2016 2:52 PM
Subject: Re: [Jprogramming] Unicode (UTF8) string deconstruction
Thanks Pascal,
Using the original example
[s=. 2 6 $ 'ఝ' ,'a','ఝ'
ఝa��
�ఝa�
8 <@(a.i.u:)(&quo
bob
>>
>> > On Jun 16, 2016, at 11:37 AM, 'Pascal Jasmin' via Programming <
>> programm...@jsoftware.com> wrote:
>> >
>> > 8 <@(a.i.u:)("0) 7 u: 'ఝ' ,'a','ఝ'
>> > ┌───┬──┬───┐
&g
Henry has nearly finished a JE project for improved display of boxed
unicode data. This will probably be released in a beta in about 2 weeks.
Short story is that display of boxed unicode data will look the way you
want it to look.
On Thu, Jun 16, 2016 at 2:08 PM, robert therriault
wrote:
> I am
at 11:37 AM, 'Pascal Jasmin' via Programming <
> programm...@jsoftware.com> wrote:
> >
> > 8 <@(a.i.u:)("0) 7 u: 'ఝ' ,'a','ఝ'
> > ┌───┬──┬───┐
> > │224 176 157│97│224 176 157│
> > └───┴──┴───┘
> >
> >
> &g
ming
> wrote:
>
> 8 <@(a.i.u:)("0) 7 u: 'ఝ' ,'a','ఝ'
> ┌───┬──┬───┐
> │224 176 157│97│224 176 157│
> └───┴──┴───┘
>
>
>
>
> - Original Message -
> From: robert therriault
> To: programm...@jsoftware.com
> Sent: Thurs
8 <@(a.i.u:)("0) 7 u: 'ఝ' ,'a','ఝ'
┌───┬──┬───┐
│224 176 157│97│224 176 157│
└───┴──┴───┘
- Original Message -
From: robert therriault
To: programm...@jsoftware.com
Sent: Thursday, June 16, 2016 2:33 PM
Subject: Re
You are quite right Don,
I should change the request to displaying unicode in UTF8 I suppose. Converting
to unicode as you have done also allows manipulation of characters within
arrays, but I am looking ways to show the results when reshaping breaks UTF8
representation.
Do you have a way to
You are not dealing with unicode. You have UTF8.
]s=. 7 u: 'ఝ' ,'a','ఝ' NB. s is converted to unicode.
ఝaఝ
$s
3
<"0 s
+---+-+---+
|ఝ|a|ఝ|
+---+-+---+
But the display still is messed up because the display first converts the
unicode to UTF8. Then does a byte count to determine
I am in the process of extending some of the type and shape visualizations that
I have done in the past [0] into the realm of unicode.
If you look through the archives of these message lists you will find that
unicode can be quite confounding, but my question is relatively simple.
I would like
: a.
>
> this almost lines up: (i think char 173/174 double prints?)
> sbox <"1 u: (95 166 188 +"0 1 i.30) { a.
>
>
> - Original Message -
> From: Ian Clark
> To: Programming forum
> Cc:
> Sent: Wednesday, April 30, 2014 1:17:56 AM
> S
forum
Cc:
Sent: Wednesday, April 30, 2014 1:17:56 AM
Subject: Re: [Jprogramming] Unicode boxed display
This is the addon mentioned by Danylo...
require 'format/sbox'
] z=: cutopen '€2.56 €72.67 €1287.21' NB. "Euro" signs
┌──
June is right. I will go further and say that if your chosen font is not
consistently fixed-width, your efforts to get tidy boxes are doomed to
failure. None of the "fixed width" fonts that I've tried (on the Macintosh)
are consistently fixed width -- certainly not over the C-J-K codespaces.
The ma
This approach won't work with different width characters(such as in Korean)
in unicode. (Some characters are wide -- taking two-character space, others
narrow -- taking one-character space)
On Wed, Apr 30, 2014 at 6:24 AM, Don Guinn wrote:
> This has bugged me for quite a while too. I tried mak
This is the addon mentioned by Danylo...
require 'format/sbox'
] z=: cutopen '€2.56 €72.67 €1287.21' NB. "Euro" signs
┌───┬┬──┐
│€2.56│€72.67│€1287.21│
└───┴┴──┘
sbox z
┌─┬──┬┐
│€2.56│€72.67│€1287.21│
└─┴──┴
This has bugged me for quite a while too. I tried making sure all text was
unicode. Didn't help. The text was converted to U8 before determining the
size of the boxes, still messing up the alignment.
This thread prompted me to think about the problem again. Instead of trying
to build the entire l
There is standard sbox addon.
On Sun, Apr 27, 2014 at 12:02 AM, Henry Rich wrote:
> Display of boxes containing non-ASCII characters messes up the alignment
> of the boxes. Has anyone written a verb to format such boxes so that the
> boxes line up?
>
> Henry Rich
>
ould not find anything good.
>>
>> there is jhtr_jhs_ though
>>
>> works well for 2d data.
>>
>>jhtr_jhs_"1 ": each <"0 i.2 5
>> 01234
>> 56789
>>
>> not so well here:
>>
>>jhtr_jhs_ "1 S:1 (< 2 2 $ ;:
ere:
>
>jhtr_jhs_ "1 S:1 (< 2 2 $ ;:'5 asd gg h') (<0;0)}": each <"0 i.2 5
> 5asd
> ggh
> 1
>
> 2
>
> 3
>
> 4
>
> 5
>
> 6
>
> 7
>
> 8
>
> 9
>
> though this may fix it?
>
>b2t =:
> slightly in JHS and J6 (haven't tried other platforms)
>
>
> - Original Message -
> From: June Kim (김창준)
> To: Programming forum
> Cc:
> Sent: Saturday, April 26, 2014 8:22:37 PM
> Subject: Re: [Jprogramming] Unicode boxed display
>
> I did. I'v
- Original Message -
From: June Kim (김창준)
To: Programming forum
Cc:
Sent: Saturday, April 26, 2014 8:26:08 PM
Subject: Re: [Jprogramming]
that is much better than the defaults, but the sample is still misaligned
slightly in JHS and J6 (haven't tried other platforms)
- Original Message -
From: June Kim (김창준)
To: Programming forum
Cc:
Sent: Saturday, April 26, 2014 8:22:37 PM
Subject: Re: [Jprogramming] Unicode
least look good this way?
>
> Converting boxed data to an html table fragment seems useful enough to
> have been done before. Has it? (already jhs util?)
>
>
>
>
> - Original Message -
> From: Henry Rich
> To: Programming forum
> Cc:
> Sent: Saturd
I did. I've been using it for years.
http://www.jsoftware.com/jwiki/JuneKim
It's box.ijs and unicodedata.ijs
sent from an android phone
2014. 4. 27. 오전 6:02에 "Henry Rich" 님이 작성:
> Display of boxes containing non-ASCII characters messes up the alignment
> of the boxes. Has anyone written a verb
one before. Has it? (already jhs util?)
- Original Message -
From: Henry Rich
To: Programming forum
Cc:
Sent: Saturday, April 26, 2014 5:02:12 PM
Subject: [Jprogramming] Unicode boxed display
Display of boxes containing non-ASCII characters messes up the alignment
of the boxes. Ha
Display of boxes containing non-ASCII characters messes up the alignment
of the boxes. Has anyone written a verb to format such boxes so that
the boxes line up?
Henry Rich
--
For information about J forums see http://www.jsoft
67 matches
Mail list logo