When passing data from python to javascript I guess you will need to use unicode or decode
try javascritp_string_var = s.decode('utf8') Or javascritp_string_var = unicode(s, 'utf8') Richard On Mon, Jan 4, 2016 at 11:34 AM, Yebach <vid.og...@gmail.com> wrote: > Hello > > I have the following scenario. > > Database is PostgreSQL, encoding set to UTF-8 > > When I read data from database with web2py I get a string reading in type > of *Bolni\xc4\x8dar* where it was suppose to be *Bolničar*. > > Now, when i use web2py to present data in my view is all fine (so I can > see *Bolničar*), but when i use Java Script or anything else to present > data I get weird behavior, where ščžć is not presented. > I would like that my reading from db would be Bolničar from beginning so > I have no more hassle later. > > also the data in my database is *Bolničar*. > > I do all the db inserts with web2py and they are all ok. Looks like only > reading is kind of "wrong" > > Any suggestions? > Thank you > > -- > 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 web2py+unsubscr...@googlegroups.com. > 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.