balavignesh writes:
> Whats the wrong in my code?
Without seeing your code, all we could do is guess, poorly.
Far better would be if you can construct a very small example, one that
you post here so any reader here could run it, that demonstrates the
behaviour you want explained. Don't forget t
luca72 wrote:
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
> position 8: ordinal not in range(128)
>
> I have solve in this way:
>
> file_ricerca = codecs.open('ri', 'wb', 'ISO-8859-15', 'repalce')
That should be 'replace' instead of 'repalce', I assume you just mistyped
the arror are:
>>> Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/eric4/DebugClients/Python/
DebugClientBase.py", line 1006, in __unhandled_exception
self.mainThread.user_exception(None, (exctype,excval,exctb), 1)
File "/usr/lib/python2.5
On Thu, 30 Oct 2008 03:01:07 -0700, luca72 wrote:
> the code is this
> # -*- coding: ISO-8859-1 -*-
> from BeautifulSoup import BeautifulSoup import urllib
> sito = urllib.urlopen('http://text.net/') esamino = BeautifulSoup(sito)
> luca = esamino.findAll('tr', align='center') lunghezza = len(luca)
Hello Again
the code is this
# -*- coding: ISO-8859-1 -*-
from BeautifulSoup import BeautifulSoup
import urllib
sito = urllib.urlopen('http://text.net/')
esamino = BeautifulSoup(sito)
luca = esamino.findAll('tr', align='center')
lunghezza = len(luca)
messaggio_per_scar = open('me', 'wb')
file_rice
luca72 wrote:
> Hy the code is this:
>
> Pok\xe9mon
That's not what I meant, I meant a piece of Python source code. This piece
has to be large enough to demonstrate the problem but with everything else
removed. The point is that guessing what is wrong in your program is just
futile; In order to h
On 30 Ott, 10:27, luca72 <[EMAIL PROTECTED]> wrote:
> Hy the code is this:
>
> Pok\xe9mon
>
> Luca
Sorry is the é
--
http://mail.python.org/mailman/listinfo/python-list
Hy the code is this:
Pok\xe9mon
Luca
--
http://mail.python.org/mailman/listinfo/python-list
luca72 wrote:
> hello i have this problem:
> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in
> position 8: ordinal not in range(128)
This is the result of transcoding a Unicode string to ASCII, where the
Unicode string contains a character that is not representable in ASCII.
Th
deelan <[EMAIL PROTECTED]> writes:
[...]
> query = "UPDATE blogs_news SET text = %s WHERE id=%s"
> cursor.execute(query, (text_extrated, id))
>
> so mysqldb will take care to quote text_extrated automatically. this
> may not not your problem, but it's considered "good style" when dealing
> with db
Hi.
Thank you both for your answers.
Finally I changed my MySQL table to UTF-8 and changed the structure
of the query (with '%s').
It works. Thank you very much.
2005/9/30, deelan <[EMAIL PROTECTED]>:
> thomas Armstrong wrote:
> (...)
> > when trying to execute a MySQL query:
> >
> > query
thomas Armstrong wrote:
(...)
> when trying to execute a MySQL query:
>
> query = "UPDATE blogs_news SET text = '" + text_extrated + "'WHERE
> id='" + id + "'"
> cursor.execute (query) #<--- error line
>
well, to start it's not the best way to do an update,
try this instead:
query = "U
Thomas Armstrong wrote:
> I'm trying to parse a UTF-8 document with special characters like
> acute-accent vowels:
>
>
> ...
> ---
>
> But I get this error message:
> ---
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in
> position 122: ordinal not in range(
13 matches
Mail list logo