On Sat, Jun 12, 2010 at 8:37 AM, MIL <[email protected]> wrote:

> I experience problem with special chars like æøå in filename when
> using models.ImageField.
>
> What am I doing wrong?
>
> models.py
>   picture = models.ImageField(upload_to='pics', blank=True,
> verbose_name='Picture of you')
>
> Using model forms
>
> Let say I want to upload picture named "æøå.jpg"
>
> If I do that, I get the following error msg:
> 'ascii' codec can't encode characters in position 59-61: ordinal not
> in range(128)
>
> Django ver 1.2 Alpha
>
>
The full traceback instead of just the error message would help people help
you. Perhaps try this:
http://docs.djangoproject.com/en/1.2/howto/deployment/modpython/#if-you-get-a-unicodeencodeerror.
Though that is in with the mod_python doc, it is not a mod_python specific
problem. In general, no matter what deployment environment, your environment
must be set to allow unicode to be passed to file functions, if you want to
be able to manipulate files that contain non-ASCII characters.

Also, you should really update to a 1.2 release level. Why are you running
alpha?

Karen
-- 
http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" 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/django-users?hl=en.

Reply via email to