Ivan Voras wrote:
> Sorry, that was just steam venting from my ears - I often get bitten by
> the "ordinal not in range(128)" error. :)
I think I'm glad to hear that. Errors should never pass silently, unless
explicitly silenced. When you get that error, it means there is a bug in
your code (just
John Machin wrote:
Just a thought: I noticed from the traceback that you are running this
on a Windows box. Profound apologies in advance if this question is an
insult to your intelligence, but you do know that Windows code page
1250 (Latin 2) -- which I guess is the code page that you would be
usi
On Sun, 24 Apr 2005 11:26:20 +0200, Ivan Voras <[EMAIL PROTECTED]>
wrote:
>Jp Calderone wrote:
>
>> You don't have a string fetched from a database, in iso-8859-2, alas.
>> That is the root of the problem you're having. What you have is a
>> unicode string.
>
>Yes, you're right :) I actually
Ivan Voras wrote:
> One thing that I always wanted to do (but probably can't be done?) is to
> set the default/implicit encoding to the one I'm using...
You can hack this into site.py, or mess with sitecustomize.py, but I don't
recommend it.
> I often have to deal with 8-bit encodings and rarely
John Machin wrote:
(Does anyone else feel that python's unicode handling is, well...
suboptimal at least?)
Your posting gives no evidence for such a conclusion.
Sorry, that was just steam venting from my ears - I often get bitten by
the "ordinal not in range(128)" error. :)
--
http://mail.python
Jp Calderone wrote:
You don't have a string fetched from a database, in iso-8859-2, alas.
That is the root of the problem you're having. What you have is a
unicode string.
Yes, you're right :) I actually did have iso-8859-2 data, but, as I
found out late last night, the data got converted to
Ivan Voras wrote:
> I have a string fetched from database, in iso8859-2, with 8bit
> characters, and I'm trying to send it over the network, via a socket:
>
>File "E:\Python24\lib\socket.py", line 249, in write
> data = str(data) # XXX Should really reject non-string non-buffers
> Unicode
On Sun, 24 Apr 2005 03:15:02 +0200, Ivan Voras
<[EMAIL PROTECTED]> wrote:
>I have a string fetched from database, in iso8859-2, with 8bit
>characters,
"8bit characters"?? Maybe you did once, or you thought you did, but
what you have now is a Unicode string, and socket.write() is expecting
an ord
Ivan Voras wrote:
I have a string fetched from database, in iso8859-2, with 8bit
characters, and I'm trying to send it over the network, via a socket:
File "E:\Python24\lib\socket.py", line 249, in write
data = str(data) # XXX Should really reject non-string non-buffers
UnicodeEncodeError:
On Sun, 24 Apr 2005 03:15:02 +0200, Ivan Voras <[EMAIL PROTECTED]> wrote:
I have a string fetched from database, in iso8859-2, with 8bit characters,
and I'm trying to send it over the network, via a socket:
You don't have a string fetched from a database, in iso-8859-2, alas.
That is the root o
I have a string fetched from database, in iso8859-2, with 8bit
characters, and I'm trying to send it over the network, via a socket:
File "E:\Python24\lib\socket.py", line 249, in write
data = str(data) # XXX Should really reject non-string non-buffers
UnicodeEncodeError: 'ascii' codec can'
11 matches
Mail list logo