when my url contains utf-8 characters such as chinese, it's occurs an
UnicodeEncodeError:




UnicodeEncodeError at /upload/snap/屏幕快照_2009-11-19_下午09.54.12.png

'ascii' codec can't encode characters in position 39-42: ordinal not
in range(128)

Request Method:         GET
Request URL:
http://192.168.10.220:8000/upload/snap/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7_2009-11-19_%E4%B8%8B%E5%8D%8809.54.12.png
Exception Type:         UnicodeEncodeError
Exception Value:

'ascii' codec can't encode characters in position 39-42: ordinal not
in range(128)

Exception Location:     /usr/lib/python2.4/site-packages/django/views/
static.py in serve, line 51
Python Executable:      /usr/local/bin/python
Python Version:         2.4.4
Python Path:    ['/home/vinnie/django/mysite', '/usr/lib/python24.zip',
'/usr/lib/python2.4', '/usr/lib/python2.4/plat-linux2', '/usr/lib/
python2.4/lib-tk', '/usr/lib/python2.4/lib-dynload', '/usr/local/lib/
python2.4/site-packages', '/usr/lib/python2.4/site-packages', '/usr/
lib/python2.4/site-packages/PIL', '/var/lib/python-support/python2.4']





Environment:

Request Method: GET
Request URL:
http://192.168.10.220:8000/upload/snap/%E5%B1%8F%E5%B9%95%E5%BF%AB%E7%85%A7_2009-11-19_%E4%B8%8B%E5%8D%8809.54.12.png
Django Version: 1.1.1
Python Version: 2.4.4
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'mysite.helloworld']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/usr/lib/python2.4/site-packages/django/core/handlers/base.py"
in get_response
  92.                 response = callback(request, *callback_args,
**callback_kwargs)
File "/usr/lib/python2.4/site-packages/django/views/static.py" in
serve
  51.     if os.path.isdir(fullpath):

Exception Type: UnicodeEncodeError at /upload/snap/屏幕快照_2009-11-19_下午
09.54.12.png
Exception Value: 'ascii' codec can't encode characters in position
39-42: ordinal not in range(128)









can anyone help~? thanks~ my wrong system setting or wrong django
setting~?

--

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


Reply via email to