Upper/Lowercase on Unicode-Data

Using (or providing) Microsoft.NET Classes

Upper/Lowercase on Unicode-Data

Postby MBaas on Thu Nov 26, 2009 9:58 am

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?
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany

Re: Upper/Lowercase on Unicode-Data

Postby harsman on Thu Nov 26, 2009 12:30 pm

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
harsman
 
Posts: 27
Joined: Thu Nov 26, 2009 12:21 pm

Re: Upper/Lowercase on Unicode-Data

Postby MBaas on Thu Nov 26, 2009 1:40 pm

Ah, now that looks much nicer :)
Thanks very much!

Michael
User avatar
MBaas
 
Posts: 156
Joined: Thu Oct 16, 2008 1:17 am
Location: Gründau / Germany


Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest