I have tried every thin including that!

This:

description = u"Some unicode here آزمایش زبان فارسی"


Generates this error:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd8 in position 18: 
ordinal 
> not in range(128)
>


On Saturday, June 18, 2016 at 4:38:29 PM UTC+4:30, Kiran Subbaraman wrote:
>
> Try this - basically mark the content as a unicode string.
>
> description = u"Some unicode here آزمایش زبان فارسی"
>
> ________________________________________
> Kiran Subbaramanhttp://subbaraman.wordpress.com/about/
>
> On Sat, 18-06-2016 1:44 PM, Sepehr Mohamadi wrote:
>
> Exactly like this:
>
> <description>Some unicode here ???????????? ???????? ??????????</description>
>
>
>
>
> On Saturday, June 18, 2016 at 12:28:48 PM UTC+4:30, Sepehr Mohamadi wrote: 
>>
>> Hey Guys, 
>>
>> I have problem using utf-8 codes in rss.
>>
>> As mentioned in doc:
>>
>> def feed():
>>>     return dict(title="my feed",
>>>                 link="http://feed.example.com";,
>>>                 description="my first feed",
>>>                 entries=[dict(title="my feed",
>>>                               link="http://feed.example.com";,
>>>                               description="Some unicode here آزمایش زبان 
>>> فارسی")
>>>                          ])
>>>
>>> When I use unicode in description I receive this in rss: 
>>>
>>>  <description>????????????????????</description>
>>
>>  
>> What's wrong!
>> Please guide
>>
> -- Resources: - http://web2py.com - http://web2py.com/book 
> (Documentation) - http://github.com/web2py/web2py (Source code) - 
> https://code.google.com/p/web2py/issues/list (Report Issues) --- You 
> received this message because you are subscribed to the Google Groups 
> "web2py-users" group. To unsubscribe from this group and stop receiving 
> emails from it, send an email to [email protected] 
> <javascript:>. For more options, visit https://groups.google.com/d/optout. 
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to