Also, you may find a CRLF delimited series of strings less handy to
use than a more J-like representation like this:

   $cs=.'ABCD';'DEÄF';'GÖßI';'ÄÖÜß'
4

or the tabular version:

   $>cs
4 8
   >cs
ABCD
DEÄF
GÖßI
ÄÖÜß

It's easy enough to convert this to the form you originally gave:

   ;cs,&.><CR,LF
ABCD
DEÄF
GÖßI
ÄÖÜß

   $;cs,&.><CR,LF
31

But that's the sort of thing I would usually only do when I'm ready to
output the strings for printing or something.

On Tue, Jul 10, 2012 at 6:09 AM, Ian Clark <earthspo...@gmail.com> wrote:
> You've got utf-8 chars in there. You need to convert to "wide" chars,
> then you'll get a matrix that behaves itself.
>
> These links may be helpful:
>  http://www.jsoftware.com/jwiki/Guides/Unicode
>  http://www.jsoftware.com/jwiki/Guides/UnicodeGettingStarted
>
>
> On Tue, Jul 10, 2012 at 10:46 AM, Rudi Mann <r...@happyplating.eu> wrote:
>> Hi,
>>
>> yesterday I stumbled over the following feature:
>>
>> charstring=.'ABCD',CR,LF,'DEÄF',CR,LF,'GÖßI',CR,LF,'ÄÖÜß',CR,LF
>>
>>   charstring
>> ABCD
>> DEÄF
>> GÖßI
>> ÄÖÜß
>>
>>   #charstring
>> 31
>> (How bizarre! I counted 24; 16 letters and 8 control characters!)
>>
>> I want to create a 4 by 4 character array from this string in order to
>> perform operations like transpose, row and column indexing, diagonal
>> extraction etc. How can I do that?
>>
>> Rudi
>> r...@happyplating.eu
>>
>>
>>
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to