[web2py] Re: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

2018-01-15 Thread Alex Beskopilny
use encode () decode() for utf8 message example: 1 def cyr2upper(inp,up=True): if len(inp) > STR_LEN_LIMIT: inp= inp[:STR_LEN_LIMIT] try: inp=inp.decode('utf8') except UnicodeDecodeError, e: inp=u'Уточните данные , плс, :)' symbols = (u"абвгдеёжзийклмн

[web2py] Re: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

2018-01-15 Thread Alexey Zaytsev
Я добавил эти строки в db.py, но это приводит к той же ошибке. воскресенье, 14 января 2018 г., 17:09:31 UTC+2 пользователь Alex Beskopilny написал: > > we can set page

[web2py] Re: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

2018-01-14 Thread Alex Beskopilny
we can set page encoding in models/db.py T.force('ru') if request.env.wsgi_url_scheme in ['https', 'HTTPS']: session.secure() ... пятница, 5 января 2018 г., 22:41:19 UTC+3 пользователь Alexey Zaytsev написал: > > >

[web2py] Re: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

2018-01-13 Thread Alexey Zaytsev
I found a solution to my problem. You need to set the language of the browser in English to the top суббота, 6 января 2018 г., 4:04:46 UTC+2 пользователь Dave S на

[web2py] Re: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128)

2018-01-05 Thread Dave S
On Friday, January 5, 2018 at 11:41:19 AM UTC-8, Alexey Zaytsev wrote: [pictographs of screens elided] I take you have users with names that require UTF-8 or code pages, rather than mere ASCII. It might be useful information to know if those are in UTF-8 or if not which code pages (we can gu

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-07 Thread Gael Princivalle
Ok I've found the problem. In the title I've hadded before a date with a different encode. Thanks Leonel for the help. Il giorno sabato 7 gennaio 2017 09:12:19 UTC+1, Gael Princivalle ha scritto: > > I've tried also like that: > description = title + 'ò' > Same error. > > description = '%s %s' %(

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-07 Thread Gael Princivalle
I've tried also like that: description = title + 'ò' Same error. description = '%s %s' %(title, event.description) Same error. description = 'ò' No error. Il giorno venerdì 6 gennaio 2017 19:23:16 UTC+1, Gael Princivalle ha scritto: > I edit the controller with notepad ++. Format is UTF-8 wit

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-06 Thread Gael Princivalle
I edit the controller with notepad ++. Format is UTF-8 without BOM. I've also tried to save it with the web2py amministrative interface, same error. Il giorno venerdì 6 gennaio 2017 18:08:13 UTC+1, Leonel Câmara ha scritto: > > Is it possible the python file itself where your controller is, is n

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-06 Thread Leonel Câmara
Is it possible the python file itself where you controller is, is not in utf-8? -- 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

[web2py] Re: 'ascii' codec can't decode byte 0xc3 in position 28: ordinal not in range(128)

2017-01-06 Thread Gael Princivalle
PostGis is in utf8. I've tried to force the utf8 codification like that: description = title + ' ' + event.description.encode("utf-8") Same error. Il giorno venerdì 6 gennaio 2017 17:27:17 UTC+1, Gael Princivalle ha scritto: > > Hello. > > I'm made a new application in a new web2py installa

[web2py] Re: ascii codec can't decode byte

2015-07-07 Thread Leonardo Pires Felix
Use psycopg2 as database driver, just install it and restart your application. pg8000 has a problem with coding. Em terça-feira, 7 de julho de 2015 18:40:55 UTC-3, icodk escreveu: > > I have a small web2py site that works fine when runs on a Windows 7 > machine. > I move it to a linux machine,a