[Baypiggies] Handling unwanted Unicode \u2019 characters in XML

Chad Netzer chad.netzer at gmail.com
Wed Jul 2 02:17:35 CEST 2008

On Tue, Jul 1, 2008 at 4:24 PM, Stephen McInerney
<spmcinerney at hotmail.com> wrote:

> I don't get that, I get this: 'â' (does it depend on C locale settings? if
> so, that's not very satisfactory at all):
>>>> print u'\u2019'.encode('utf-8')
> â

Hmmm, what are the results of these set of commands?

$ python
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42)
>>> import locale
>>> locale.getdefaultlocale()
('en_US', 'UTF8')
>>> print u'\u2019'
>>> print u'\u00E2'

More information about the Baypiggies mailing list