google-code-export / wadofstuff

Automatically exported from code.google.com/p/wadofstuff
1 stars 0 forks source link

Encoding Error #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
My data has some non-ASCII characters, when using wadofstuff serializer I get a 
UnicodeEncodeError 'ordinal not in range(128)'
Any ideas how to correct this??

The default serializer does not throw this exception. 

Original issue reported on code.google.com by Tofi.Buz...@gmail.com on 23 Dec 2009 at 2:21

GoogleCodeExporter commented 9 years ago
Can you please provide some sample data?

Original comment by mattimus...@gmail.com on 23 Dec 2009 at 3:32

GoogleCodeExporter commented 9 years ago
Here is the view code:

def complejo(request, id):
    """Regresa JSON con info del complejo con id"""
    comp = get_object_or_404(Complejo,pk=id)
    serializers.serialize("json", [comp], ensure_ascii =False)

Here is the traceback:
http://dpaste.com/136886/

This is what I get when using the standard serializer:
http://dpaste.com/136887/

I hope this is enough, let me know if you need anything else... thanks

Original comment by Tofi.Buz...@gmail.com on 23 Dec 2009 at 5:21

GoogleCodeExporter commented 9 years ago
Aha, me too. This is really a problem... Any workaround for now? I'll compare 
it with 
what the default one does...

Original comment by kaschin...@googlemail.com on 19 Jan 2010 at 11:56

GoogleCodeExporter commented 9 years ago
@kaschinski Please post some example code and expected output. The original 
poster's
code at dpaste.com is no longer there.

Original comment by mattimus...@gmail.com on 19 Jan 2010 at 9:48

GoogleCodeExporter commented 9 years ago
Try replacing your copy wadofstuff/django/serializers/python.py with newer 
version from 
here
http://wadofstuff.googlecode.com/svn/trunk/python/serializer/wadofstuff/django/s
erializ
ers/python.py

Original comment by mattimus...@gmail.com on 20 Jan 2010 at 1:39

GoogleCodeExporter commented 9 years ago

Original comment by mattimus...@gmail.com on 11 May 2010 at 1:35

GoogleCodeExporter commented 9 years ago
Seems like a duplicate of what I just reported under issue 19.

Original comment by jens.lun...@a-b-i.se on 14 Nov 2011 at 9:45