Hello my friends.
I have a problem with json, charset, and python date and time encoding.
My goal is to use web2py rows (db().select()) to simplify my work, but I
not find the best way made.
See.
import json
# Not suport python datetime.
from gluon.contrib.simplejson import JSONEncoder
#Not supor
I need to understand if this is a bug or if it is the expected behaviour
and I'm doing something wrong.
I have two web2py applications. One of them implements an XMLRPC
webservice, and the other one consumes it.
All the controllers (in both applications) have this first line:
# -*- coding: utf-
Hello
I just discovered the following behavior when user fills the user
registration form
in my form i have confirm password. and in storage the following values are
stored
, 'email':
'test_m...@gmail.com'}>
as you can see the password_two is not encrypted.
In case i forgot to set the encr
You need XML() web2py helper when you pass python string or generate js
code from python you need it...
In the view :
{{=XML(python_var_containing_text_or_js_code}}
Richard
On Wed, Jan 20, 2016 at 4:52 AM, Yebach wrote:
> In this case I get the list of string
>
> users = [u'Ga\u0161peri\u010d
Solved the problem
I posted on stackoverflow.com
http://stackoverflow.com/questions/34596573/javascript-string-encoding-on-client
vote up or correct if it is not ok
On Wednesday, January 20, 2016 at 3:41:13 PM UTC+1, Richard wrote:
>
> You need XML() web2py helper when you pass python string o
In this case I get the list of string
users = [u'Ga\u0161peri\u010d', u'GovednikK', u'Jam\u0161ek',
u'Jurejev\u010di\u010d', u'Kati\u0107', u'Kostelec', u'Ko\u0161ele',
u'Male\u0161i\u010d', u'Muhi\u010d', u'Re\u017eek', u'Sitar',
u'Toma\u017ei\u010d', u'Viktorovski', u'Vuk\u0161ini\u010dD',
>From js directly? I not really good with js but I guess there is encoding
too... From web2py you can't since everything use byte (str('byte string'))
and not unicode (u'your properly encoded string')... So if you pass data
from web2py what I showed you is the way of doing it...
Richard
On Mon, J
Ok, but I would like to already see the right endocing when I get data from
server database?
On Monday, January 4, 2016 at 5:39:32 PM UTC+1, Richard wrote:
>
> When passing data from python to javascript I guess you will need to use
> unicode or decode
>
> try
>
> javascritp_string_var = s.dec
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 wrote:
> Hello
>
> I have the following scenario.
>
> Databa
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
An application has suddenly started generating exceptions pertaining to
encoding, when I attempt to perform database inserts or lookups.
The lookup operation produces this exception:
3. Exception in 'Agent_Base check_comparable_record_exists_in_db()': 'ascii'
codec can't decode byte 0xe2 in po
I am using the decorator @request.restful() in order to implement a rest
API. Unfortunatly, one on my function take an argument which can contain
non-ascii character, for instance 'Gymnase Joseph Guétat'. Each request
using this string returns a web2py error with the following comment:
invalid
Hello,
It seems that the format option in db.define_table isn't working properly
when deployed on GAE.
Please, consider these two tables:
db.define_table('ingrediente',
Field('nombre', 'string',
requires=IS_NOT_EMPTY(error_message='Se ha de indicar el nombre')),
It seems that something isn't working properly when using the attribute
'format' and not-only English chars on db.define_table when deployed on GAE
Please, consider theses two table definitions:
db.define_table('ingrediente',
Field('nombre', 'string',
requires=IS_NOT_EMPTY(error_m
I'm using GAE + Google Cloud SQL and when I insert some data to local
server with special chars like in "Água" it saves the data, but when i try
to retrieve it i get an encoding error from python.
In production it is automaticaly encoded to \u00c1gua and saves to DB. Is
it some mysql feature tha
Hi there,
I'm using web2py on GAE and have recently run into some problems with
cp1252 characters being submitted via cut and posted text in forms.
At present whenever this happens I get exceptions complaining that the
string isn't valid unicode.
Looking through the web2py codebase I can see t
Hi there,
I'm using web2py on GAE and have recently run into some problems with
cp1252 characters being submitted via cut and posted text in forms.
At present whenever this happens I get exceptions complaining that the
string isn't valid unicode.
Looking through the web2py codebase I can see t
Are you talking about the URL?
If yes read this :
http://groups.google.com/group/fameisfame/browse_thread/thread/081461db3d72c14b
Richard
On Sat, Sep 10, 2011 at 2:14 PM, Emy wrote:
> hey all
> my website is dealing with arabic characters and I have a problem with
> encoding I can read from DB
hey all
my website is dealing with arabic characters and I have a problem with
encoding I can read from DB wothout problem when I try to insert any
data using ajax function I got the string written like that in
python :
"%D8%A8%D8%A8%D9%8A%D9%8A%D9%8A%D8%B3%D8%B3%'"
when I try to write :
txt=unic
Hi,
I modified the insert( ) function of appadmin.py from the example app
by passing a dict to the labels attribute of SQLFORM( ) - in other
words:
appadmin.py > insert( ) > SQLFORM(.. labels=dict)
The labels, with Portuguese characters, are not correctly encoded on
the final result. Note th
It's not web2py related, but I hope someone can help me.
I'm sending data via ajax, which is urlencoded JSON object (I used
jquery-json).
Then, I use json.loads(variable) to load the object.
Everything works good for normal ASCII characters, but if I send non-
ascii chars, i get the following:
U
Hey,
I am generating URLs on the go and then decoding when they are called by
user.
e.g.
application/controller/funtion/foo/bar/.
I encode foo and bar individually so that if they have spaces, they get
encoded to %20 not _ which seems liked default.
but when I decode it (After user calls it
Hi Folks,
I'm not sure why but when I'm using as_dict function in a row element it's
not returning UTF-8 characters an example:
db.define_table('evento',
SQLField('dono','reference auth_user',writable=False,readable=False),
SQLField('paciente', 'reference paciente', label='Paciente*'),
23 matches
Mail list logo