Re: How to convert EURO Symbol € character to Hex

Hi Khabza,

> now my problem is I cant type =E2=82=AC symbol on my editor Textpad it re=
turn funny
> characters like =C3=A2=E2=80=9A=C2=AC

Textpad probably allows you to set the encoding of the file to UTF-8,
I think. Set it to UTF-8 so that you will be able to type in the =E2=82=AC
symbol.

use utf8; # use whenever source code includes UTF-8

if ( $euros eq 'BC=E2=82=AC01' ) {
# ...
}


__OR__

if ( $euros eq 'BC' . chr(0x20AC) . '01' ) { # 0x20AC is the
hexadecimal value of =E2=82=AC
# ...
}

Regards,
Alan Haggai Alavi.
--
The difference makes the difference

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Alan Haggai Alavi [ Di, 18 Januar 2011 10:03 ] [ ID #2053487 ]
Perl » gmane.comp.lang.perl.beginners » Re: How to convert EURO Symbol € character to Hex

Vorheriges Thema: regex for matching Google URLs
Nächstes Thema: Module supporting certifics