Unicode literals to latin-1

2008-01-30 Thread David.Reksten
How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around Fr\u00f8ya.decode('latin-1') but to no avail. .david -- http://mail.python.org/mailman/listinfo/python-list

Re: Unicode literals to latin-1

2008-01-30 Thread Berteun Damman
On Wed, 30 Jan 2008 09:57:55 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around Fr\u00f8ya.decode('latin-1') but to no avail.

Re: Unicode literals to latin-1

2008-01-30 Thread Piet van Oostrum
[EMAIL PROTECTED] (DR) wrote: DR How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? DR I have tried variations around DR Fr\u00f8ya.decode('latin-1') DR but to no avail. You have to use encode instead of decode,

SV: Unicode literals to latin-1

2008-01-30 Thread David.Reksten
On 30. januar 2008 10:21, Berteun Damman wrote: On Wed, 30 Jan 2008 09:57:55 +0100, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around

Re: Unicode literals to latin-1

2008-01-30 Thread Marc 'BlackJack' Rintsch
On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around Fr\u00f8ya.decode('latin-1') but to no avail. In [388]:

SV: Unicode literals to latin-1

2008-01-30 Thread David.Reksten
On 30. januar 2008 10:48, Marc 'BlackJack' Rintsch wrote: On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya? I have tried variations around

Re: Unicode literals to latin-1

2008-01-30 Thread Gabriel Genellina
On 30 ene, 07:54, [EMAIL PROTECTED] wrote: On 30. januar 2008 10:48, Marc 'BlackJack' Rintsch wrote: On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such as Fr\u00f8ya to the latin-1 equivalent, Frøya?

SV: Unicode literals to latin-1

2008-01-30 Thread David.Reksten
On 30. januar 2008 14:31, Gabriel Genellina wrote: On 30 ene, 07:54, [EMAIL PROTECTED] wrote: On 30. januar 2008 10:48, Marc 'BlackJack' Rintsch wrote: On Wed, 30 Jan 2008 09:57:55 +0100, David.Reksten wrote: How can I convert a string read from a database containing unicode literals, such