Nigel Peck wrote:
Dr.Ruud wrote:
Nigel Peck schreef:

I have a web application that gathers various data. When users enter
pound signs (english money not #) a number of strange characters get
stored in the database:

Here's a copy and paste:

£6.50 per hour

That is UTF8 encoded text. You can use
    Encode::decode("utf8", $octets)
to convert it to Perl's internal string format.

You could equally convert it from UTF-8 to ISO-8859-1
(see the Encode documentation), because the pound sign
is codepoint 163 in that character set.

Thanks for this. How can I find out a string's encoding?

Ask the person/program that provided you with that string what encoding they are using.


John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to