Hey great, I'll look into it,
I've started altering the gviz module myself, since they used the
function repr(s) which like you said prints the python encoding and
not the stuff you want it to show..

Thanks again (and as always) for your kind help.

I'll write here a post once the bug was fixed.

On Jan 20, 5:08 pm, VizBoy <[email protected]> wrote:
> Note that this might also be a side-effect of an older version of the
> gviz_api.py module, that didn't support unicode.
> Please download the latest version before you try 
> again.http://code.google.com/p/google-visualization-python/
>
> - VizBoy.
>
> On Tue, Jan 20, 2009 at 4:58 PM, VizBoy <[email protected]> wrote:
> > So, the problem is mainly the u before the string.
> > This is python unicode encoding, which javascript cannot understand.
> > In python, if you have a string s and you just output s, you might get
> > things that look like u'\u....' which is strictly a python way to denote
> > strings. Not good to export this to any other system.
> > The thing to use is "print"
> > print s will print the actual string and not its representation.
> > I'm not a python expert (far from it) but you need to look into your server
> > code and see how to better print the strings into the response.
> > Let me know if this helps.
>
> > - VizBoy.
>
> > On Tue, Jan 20, 2009 at 4:51 PM, Chen Harel <[email protected]> wrote:
>
> >> Hi
> >> you can go via browser to:
> >>http://epihourtesting2.appspot.com/searchShow?name=greek
> >> or test for name=13
>
> >> In 13 you will see somewhere in the code the 2013 char (in python if I
> >> decode it it's \x96)
> >> and for Greek, the epsilon letters are some other u..something
> >> So, the python and ToJSON does the job... and now the client should
> >> know how to parse it currect...
>
> >> Hope this helps
>
> >> On Jan 20, 4:24 pm, VizBoy <[email protected]> wrote:
> >> > Interesting...
>
> >> > I think the first step to check would be to go to the datasource url not
> >> > through a gadget but directly in the browser and examining the response.
> >> > Another way to examine the response would be to use firefox's firebug.
> >> > Once you see what the response is, perhaps you'll discover some python
> >> error
> >> > that is caused by the unicode and we can think of a solution from there.
> >> > You could post the link if you want.
>
> >> > Regards,
> >> >     VizBoy.
>
> >> > On Mon, Jan 19, 2009 at 11:30 PM, Chen Harel <[email protected]>
> >> wrote:
>
> >> > > Hi, I am parsing xml file using urlfetch in my appengine, I prepare a
> >> > > response dictionary and return it via ToJSonReponse function in
> >> > > gviz_api.
>
> >> > > The gadget client sends me the queries with get parameter for the
> >> > > parsing.
> >> > > Everything worked great, until one of the strings returned from the
> >> > > urlfetch had some weird signs (u'\u2013') which is only "-" ...
> >> > > Now I've tried manipulating the data and setting
> >> > > self.response.headers['Content-Type'] = 'text/plain; charset=utf-8'
> >> > > My playing got the response to be returned, when querying it via
> >> > > browser.
> >> > > But now it gives timeouts from within the gadget.
> >> > > (Every other query that doesn't have this character in the response,
> >> > > works great...)
>
> >> > > Any help would be great,
> >> > > Chen.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to