Depending if you hardcode or not your special language character or not. If
you only input unicode into field by the mean of your app you should not
have to pay attention, web2py will handle the differents languages. But if
you defined you alphabets in differents languages as constant type variable
in your code base you may need decode/encode from unicode.
I am not an expert in encoding and how works web2py at this level, but by
default web2py use python 2.7 byte or str type... If it get a none ASCII
character it get store in str in utf-8 hexadecimal representation for
characters that can't be support by ASCII...
So the best way to avoid any issue with encoding in web2py is to always use
plain ascii in your code base...
If you can't, you have different option, for alphabet you can generate them
with chr and ord
or you can use unicode:
var = u'unicode string'.decode(yourencoding).encode('utf-8')
Hope it helps and I didn't make error in my explanation.
Cheer
Richard
On Fri, Nov 27, 2015 at 9:48 AM, Pierre <[email protected]> wrote:
> Hi all,
>
> I am writing an app supposed to handle different languages/alphabets
> Do I have to pay special attention to unicode issues (the subject is quite
> confusing)
> or is this managed by the web2py api and the build-in translation tool ?
>
>
>
> --
> 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.
>
--
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.