Re: How to convert EURO Symbol € character to Hex

Hi Khabza,

> I have end up using ASCII Encoding instant of UTF-8
> it does not find any thing if I use 'BC' . chr(0x20AC) . '01' =C2=A0then =
i
> change to 'BC' . chr(0x80) . '01'
>
> The following code works
>
> if ( $euros eq 'BC' . chr(0x80) . '01' ) { =C2=A0# 0x20AC is the
> hexadecimal value of =E2=82=AC
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # ...
> =C2=A0 =C2=A0 }

The Euro symbol is attributed 0x80 in Windows-1252 encoding and not in
ASCII. Euro symbol was created much later than the latest ASCII
revision.


> which I am not sure if my code will work to all version of windows.
> Is there a different between using ASCII or UTF-8?

UTF-8 encoding is a super-set of ASCII encoding.


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 11:53 ] [ ID #2053489 ]
Perl » gmane.comp.lang.perl.beginners » Re: How to convert EURO Symbol € character to Hex

Vorheriges Thema: Perl Mail::Sendmail encoding problem
Nächstes Thema: Re: How to convert EURO Symbol € character to Hex