On Thursday, June 14, 2012 1:58:28 PM UTC+2, lawgon wrote:
>
> On Thu, 2012-06-14 at 04:19 -0700, bruno desthuilliers wrote: 
> > > I have an application which runs on a webfaction hosting. 
> > 
> > 
> > 
> > How is it deployed exactly ? 
>
> apache + wsgi 
>


Ok, so that's the same setup we use... Are you/they using the 
WSGIDaemonProcess and WSGIProcessGroup directives ? (I bet they do if it's 
shared hosting and they know what's good for them). But anyway: I did not 
test the damn thing thoroughly but IIRC the problem appeared whether 
running daemon or embedded mode - the django process env is stil inherited 
from the Apache process. Using os.setenv in the .wsgi script is _supposed_ 
to cure the problem but our experience (here again I did not have time to 
really explore the problem :-/) is that it often doesn't work (can't even 
tell if it ever worked at all), so we alway end up editing apache conf - 
which _is_ a know working solution.

Your best bet here is to first try the os.setenv trick, and if it doesn't 
solve the problem contact webfaction and see what you / they can do.

HTH (and please report the solution)

 

> > (sorry never used webfaction hosting for django - nor for anything 
> > else 
> > FWIW) 
>
> not my choice, client choice 
> >   
> > 
> > > I also have 
> > > the same app running on my devel machine. The code in the two 
> > machines 
> > > are pulled from the same repo. Django versions are identical. 
> > Python 
> > > versions are identical. I try to upload a file called Lisäinfo 
> > > kummeille.pdf in the dev machine. No problem. When I try the same 
> > file 
> > > in webfaction, I get the above error. I have checked and find I can 
> > use 
> > > python to open and save a file of the same name from the python 
> > prompt 
> > > in the webfaction shell. In templates, admin and and generated 
> > pdfs, 
> > > these non ascii characters are handled perfectly. Has anyone got 
> > any 
> > > clues about this? 
> > 
> > 
> > 
> > 
> > Each time I had this problem, it happened that the server process was 
> > using 
> > Apache's default locale, and that Apache default's locale was "C", not 
> > the 
> > utf8 locale configured for users. Not much of a problem for me since I 
> > have 
> > admin access but that may not be the case with webfaction :-/ 
>
> I think that should be it - my dev server runs nginx (and on my own 
> server I have root and anyway do not use apache. 
>
> -- 
> regards 
> Kenneth Gonsalves 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/Plu2MEPmJ40J.
To post to this group, send email to django-users@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