Re: Caracters in other languages
- Posted by gertie at visionsix.com Jul 07, 2003
- 542 views
On 8 Jul 2003, at 8:53, Derek Parnell wrote: > > > ----- Original Message -----=20 > From: <rml at rubis.trix.net> > To: "EUforum" <EUforum at topica.com> > Subject: Caracters in other languages > > > Hi Euforians; > > I'm having problems with caracters with an accent in portuguese > and euphoria. If I use uppercase, they are not changed to uppercase, they > changed into spaces (or no asc caracters.) > For example: =E9, =E7, =E3, =E1 and so on. > The same happens when I use getc to read a txt file that cotains these > caracters. > My computer is running win2000 in english, with locale in > brazilian portuguese. > > Any suggestion ? > > --------- > Derek replies... > > The Euphoria upper() and lower() functions only work for the English > alphabet and only for ASCII character sets. Annoying, isn't it? Mirc does the same. > sequence UC,LC > > UC =3D repeat(1, 255) > for i =3D 1 to length(UC) do > UC[i] =3D i > end for > LC =3D UC > UC['a'] =3D 'A' > UC['b'] =3D 'B' > . . . > UC['=E9'] =3D '=C9' > . . . > LC['A'] =3D 'a' > LC['B'] =3D 'b' > . . . > LC['=C9'] =3D '=E9' > . . . > > function Upper(object x) > if integer(x) and x > 0 and x < 256 then > return UC[x] > elsif sequence(x) then > for i =3D 1 to length(x) do > x[i] =3D Upper(x[i]) > end for > end if > end function > > and similar for your Lower function. > > These are slower than the Euphoria ones, but a lot more accurate. > --=20 What is "=3D" in all the above, and why the $^& is it there? If Topica changed some Derek's code to "=3D", what other errors were introduced? Kat