Re: Replacing unicode characters
From: Bart Lateur (bart.lateur_at_pandora.be)
Date: 02/15/04
- Next message: Anno Siegel: "Re: Choosing grouping of split items"
- Previous message: Bart Lateur: "Re: Why is Perl losing ground?"
- In reply to: Tulan W. Hu: "Re: Replacing unicode characters"
- Next in thread: Tulan W. Hu: "Re: Replacing unicode characters"
- Reply: Tulan W. Hu: "Re: Replacing unicode characters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 15 Feb 2004 11:28:42 GMT
Tulan W. Hu wrote:
>I tried the above and got the following error message
>"\x{2019}" does not map to iso-8859-1 at utf.pl line 8, <$FILE> line 161.
>but the pre-5.8 code just removes the characters for me.
Don't use Latin-1 for the encoding, try cp1252 (AKA Windows) instead.
That turns out to be chr(0x92) ("right single quotation mark"). For the
whole list, see
<http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT>
If you don't want the Windows character set, I'd replace all "single
quotation marks" with apostrophes, ("'", chr(39)), and all "double
quotation marks" with quotes ('"', chr(34)).
-- Bart.
- Next message: Anno Siegel: "Re: Choosing grouping of split items"
- Previous message: Bart Lateur: "Re: Why is Perl losing ground?"
- In reply to: Tulan W. Hu: "Re: Replacing unicode characters"
- Next in thread: Tulan W. Hu: "Re: Replacing unicode characters"
- Reply: Tulan W. Hu: "Re: Replacing unicode characters"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|