Page 1 of 1

Upper/Lowercase on Unicode-Data

Posted: Thu Nov 26, 2009 9:58 am
by MBaas
Morten recently posted an article with that subject in the Dyalogusers-Group.
Unfortunately FF3.5 only displays garbage for me when I read that article, despite configuring it to display APL (as described in APL Wiki). I also tried to paste that garbage into the Dyalog Session, as sometimes this clears up things - but this time "Garbage in, Garbage out" applied :(

Would someone pls. be so kind to have a look at that article and paste it here?

Re: Upper/Lowercase on Unicode-Data

Posted: Thu Nov 26, 2009 12:30 pm
by harsman
Someone asked me how to do this today, and I thought it would be worth posting the solution here:

Code: Select all

      ToLower←{⎕USING←'' ⋄ (⍴⍵)⍴(⎕NEW System.String (⊂,⍵)).ToLower ⍬}

      text (ToLower text)
 ABCDEFGÆØÅ   abcdefgæøå
 ΑΒΓΔΕΖΗΘΙΚ   αβγδεζηθικ
 АБВГДЕЖЗИЙ   абвгдежзий
 ԱԲԳԴԵԶԷԸԹԺ աբգդեզէըթժ


Requires the Microsoft.Net framework to be present, of course.

Morten

Re: Upper/Lowercase on Unicode-Data

Posted: Thu Nov 26, 2009 1:40 pm
by MBaas
Ah, now that looks much nicer :)
Thanks very much!

Michael