this is the best article i have read about Unicode and characters sets:

https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/

 ;)



El viernes, 21 de diciembre de 2018, 10:27:00 (UTC-6), Ramos escribió:
>
> Hello i have this var in my code after reading a webservice.
>
> x='OITO BITS - INFORM*\xc1*TICA, LDA. '  
>
> i want to return from my controller 
> 'OITO BITS - INFORM*Á*TICA, LDA. '  
>
>
> this is my relevant code 
> res=[]
> x='OITO BITS - INFORM*\xc1*TICA, LDA. ' 
> z=x.encode('latin-1')
> print z   >>>> it prints    'OITO BITS - INFORM*Á*TICA, LDA. ' 
> res.append(x) >>> if i replace x with z i get the error below
> return response.json(res)
>
>
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc1 in position 18: 
> ordinal 
> not in range(128)
> Any help ???
>
> regards
> António
>

-- 
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