Hi,

I'm using sqlite3 as db for my django project.
In order to load the data in the db I first generated a unicode string
(which contains danish characters "ø, æ, å") and dumped such a string
to a file (in json format) as follows:
f_hdl = file(json_offers_path, 'w')
f_hdl.write(offer_entry.encode('utf-8'))
f_hdl.close()

I then loaded the data in the database using the command:
python manage.py loaddata path/to/json/file

I could run the local server for development without any problem. In
the homepage I have to display some information that may contain
danish characters. If the page I have to display doesn't contain
danish characters I don't get any error.
If it does contain them I get the following error:

Exception Type: UnicodeEncodeError
Exception Value: 'ascii' codec can't encode character u'\xe6' in
position 27: ordinal not in range(128)
Exception Location: C:\Python25\lib\site-packages\django\utils
\encoding.py in force_unicode, line 39
Unicode error hint: The string that could not be encoded/decoded was:
roanlæg

Do you have any suggestion on how to solve the problem?

Many thanks
Francesco


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to