Re: How to convert EURO Symbol € character to Hex

I have end up using ASCII Encoding instant of UTF-8
it does not find any thing if I use 'BC' . chr(0x20AC) . '01' then i
change to 'BC' . chr(0x80) . '01'

The following code works

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



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?

Regards
Khabza
Green IT Web
http://www.greenitweb.co.za
> Hi Khabza,
>
>> now my problem is I cant type =80 symbol on my editor Textpad it return =
funny
>> characters like =E2=82=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 =80
> symbol.
>
> use utf8; # use whenever source code includes UTF-8
>
> if ( $euros eq 'BC=8001' ) {
> # ...
> }
>
>
> __OR__
>
> if ( $euros eq 'BC' . chr(0x20AC) . '01' ) { # 0x20AC is the
> hexadecimal value of =80
> # ...
> }
>
> Regards,
> Alan Haggai Alavi.

--
To unsubscribe, e-mail: beginners-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Khabza Mkhize [ Di, 18 Januar 2011 11:39 ] [ ID #2053387 ]
Perl » gmane.comp.lang.perl.beginners » Re: How to convert EURO Symbol € character to Hex

Vorheriges Thema: Re: How to convert EURO Symbol € character to Hex
Nächstes Thema: regex for matching Google URLs