Python strings have encode() method. See 
http://www.python.org/doc/2.3.5/lib/string-methods.html for official 
documentation. You can find examples of utf-8 conversion here: 
http://lazutkin.com/blog/2005/sep/23/code_rss_django/

Thanks,

Eugene

"Andreas Neumeier" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> Hello,
>
> when generating a rss feed, i get the following:
>
> ---
> There's been an error:
>
> Traceback (most recent call last):
>
>  File "/usr/lib/python2.3/site-packages/django/core/handlers/base.py",
> line 64, in get_response
>    response = callback(request, **param_dict)
>
>  File "/usr/lib/python2.3/site-packages/django/views/rss/rss.py", line
> 7, in feed
>    f = rss.get_registered_feed(slug).get_feed(param)
>
>  File "/usr/lib/python2.3/site-packages/django/core/rss.py", line 96,
> in get_feed
>    f.add_item(
>
> UnicodeDecodeError: 'utf8' codec can't decode bytes in position 25-30:
> unsupported Unicode code range
> ---
>
> I guess, I need to convert to UTF-8 when generating the feeditems in
> the database. I use the (djangoproject.com) default tools.
>
> How may I convert the entries produced from the python script?
>
> Thanks!
>
> --
> Andreas Neumeier
> Walter-Paetzmannstr. 9
> 82008 Unterhaching
> Germany
> +49(89)61098960
> +49(89)38077929
> +49(179)2431882
> http://andreas.neumeier.org
> mailto:andreas(at)neumeier.org
> UIN:14143331
>
> 



Reply via email to