Thursday, October 29, 2015

Re: django filebrowser decoding

On Thu, Oct 29, 2015 at 8:35 PM, Emīls Brass <emils.brass@gmail.com> wrote:
> I got django filebrowser for admin, where admin can see all added files in
> special folder.
>
> When admin click on folder to see whats inside, if there is some file with
> name who contains UNICODE chartacter, then I shows 500 error, but if not,
> everything is working.
>
> We exported this webpage to new server, on old server everything where
> working good, but on new server we got this problem, but all website file
> are the same, so, I think that problem could be in some python libary files,
> I need some plugin or something like that to be installed, but what?
>
> Example:
> Userfiles/folder1/abcde.pdf - all working good
> Userfiles/folder2/ābčdē.pdf - not working, 500 error
>
> On log file I got this message - UnicodeEncodeError: 'ascii' codec can't
> encode characters in position 0-5: ordinal not in range(128)
>

The locale on the new server is the C locale, and is not the same as
the locale on the old server, which was some UTF-8 locale.

Consult the documentation for the webserver you use to host django,
and ensure that the LANG is set appropriately. Searching google for
"<name of web server> LANG" should show appropriate results.

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1LEniOEh%3DXEaTWZnfyHc7RopU%3D2vSEVeH6FJZ8U%3D8TH8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment