Character conversion (was: Small feature request for future EU versions)
- Posted by "Juergen Luethje" <j.lue at gmx.de> Oct 23, 2004
- 472 views
( It was high time to change the subject. ) Igor Kachan wrote: > Hi, Juergen! > > You wrote: > > [snip] > >> I hadn't compared it to that lib, because I wasn't aware of that library. >> Now I downloaded 'nlseu.zip' and compared it: >> Applied to the whole text of Euphoria/Doc/Library.doc, the nlsLower() >> function in 'nlseu.zip' takes 310% of the time that the lower() function >> in 'wildcard.e' uses. Furthermore, nlsLower() is only for Windows. > > There is wildcarr.e in my ru_eu_9_.zip package. > It has the additional functions with the bilingual (English/Russian) names. > > English names of those functions are case_la() - for Latin alphabet, This is just standard lower() and upper() combined in 1 function. > and case_ru() - for Russian alphabet in 5 different encodings. This one was interesting for me. > I did not test the speed of those functions, they just work for me and I do > not care. > > Try please, any alphabet may be supported that Russian way, I think. First, I had to remove all Russian routine names from 'wildcarr.e', because my Euphoria complained. Then I run the following test program:
include wildcarr.e constant CP = {"dos","win","koi","iso","mac"} sequence s s = "heLLo" for i = 1 to length(CP) do printf(1, "'%s'\n", {case_ru(0,s,CP[i])}) end for
This test program just printed 5 times "heLLo" (German Windows 98). Thanks for the suggestion anyway. Regards, Juergen