Fredrik Lundh wrote:
> "Lad" wrote:
>
> > The result of print "*", repr(RealName), type(RealName), "*" is
> >
> > * 'Fritschov\xe1 Laura' *
>
> looks like the MySQL interface is returning 8-bit strings using ISO-8859-1
> encoding (or some variation of that; \xE1 is "LATIN SMALL LETTER A
> WITH AC
"Lad" wrote:
> The result of print "*", repr(RealName), type(RealName), "*" is
>
> * 'Fritschov\xe1 Laura' *
looks like the MySQL interface is returning 8-bit strings using ISO-8859-1
encoding (or some variation of that; \xE1 is "LATIN SMALL LETTER A
WITH ACUTE" in 8859-1).
have you tried passi
Fredrik Lundh wrote:
> Lad wrote:
>
> > for
> > print repr(RealName) command
> > I will get
> >
> > P?ibylov\xe1 Ludmila
> > where instead of ? should be also a character
>
> that's not very likely; repr() always includes quotes, always escapes
> non-ASCII characters, and optionally includes a Un
Lad wrote:
> for
> print repr(RealName) command
> I will get
>
> P?ibylov\xe1 Ludmila
> where instead of ? should be also a character
that's not very likely; repr() always includes quotes, always escapes
non-ASCII characters, and optionally includes a Unicode prefix.
please try this
prin
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Lad wrote:
>
> > The text is from Mysql table field that uses utf8_czech_ci collation,
> > but when I try
> > `RealName`.decode('utf8'),where RealName is that field of MySQL
> >
> > I will get:
> > UnicodeDecodeError: 'ascii' codec can't d
In <[EMAIL PROTECTED]>, Lad wrote:
> The text is from Mysql table field that uses utf8_czech_ci collation,
> but when I try
> `RealName`.decode('utf8'),where RealName is that field of MySQL
>
> I will get:
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 3:
> ordinal
> not
Fredrik Lundh wrote:
> Lad wrote:
>
> > To be able to decode a string successfully, I need to know what coding
> > it is in.
>
> ask whoever provided the string.
>
> > The string can be coded in utf8 or in windows-1250 or in another
> > coding. Is there a method how to find out the string coding.
Lad wrote:
> To be able to decode a string successfully, I need to know what coding
> it is in.
ask whoever provided the string.
> The string can be coded in utf8 or in windows-1250 or in another
> coding. Is there a method how to find out the string coding.
in general, no. if you have enough
To be able to decode a string successfully, I need to know what coding
it is in.
The string can be coded in utf8 or in windows-1250 or in another
coding.
Is there a method how to find out the string coding.
Thank you for help
L.
--
http://mail.python.org/mailman/listinfo/python-list