develooper Front page | perl.beginners | Postings from January 2011

Re: How to convert EURO Symbol € character to Hex

Thread Previous
From:
Alan Haggai Alavi
Date:
January 19, 2011 01:06
Subject:
Re: How to convert EURO Symbol € character to Hex
Message ID:
AANLkTikj6QAzN2HujJy1XTEaCewdUxYdPSns4RsQu8LU@mail.gmail.com
Hi Khabza,

> now my problem is I cant type € symbol on my editor Textpad it return funny
> characters like €

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 €
symbol.

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

    if ( $euros eq 'BC€01' ) {
        # ...
    }


__OR__

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

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

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About