Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 345229

Summary: app-admin/webapp-config fails to write content file with non-ascii filenames
Product: Gentoo Linux Reporter: Akos Szalkai <szalkai>
Component: Current packagesAssignee: Gentoo Web Application Packages Maintainers <web-apps>
Status: RESOLVED OBSOLETE    
Severity: normal CC: jmbsvicetto, proxy-maint
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: UTF-8 encode filenames written to the content file.

Description Akos Szalkai 2010-11-12 18:51:12 UTC
If there are non-ascii filenames in the web application, webapp-config fails when trying to create the content file.  The reason is that when the filenames are written to the content file, there is an implicit conversion to ascii.  It should either be utf-8 or configurable.

Reproducible: Always

Steps to Reproduce:
1. Add some non-ascii filenames to your web application.  Alternatively try to install otrs from the rion overlay.
2. Install the package using webapp-config.


Actual Results:  
You get the following error message:
* Failed to write content file /var/www/otrs.2f.hu/htdocs/.webapp-otrs-2.4.9!
* Error was: 'ascii' codec can't encode characters in position 202273-202276: ordinal not in range(128)

And the .webapp-otrs-2.4.9 file is empty.

Expected Results:  
No error message, .webapp-otrs-2.4.9 containing the web application contents.

Trivial patch attached, with utf-8 encoding.  The encoding could also be made configurable (I volunteer to do that if it's needed, but in my opinion, utf-8 should be it).
Comment 1 Akos Szalkai 2010-11-12 18:54:30 UTC
Created attachment 254123 [details, diff]
UTF-8 encode filenames written to the content file.
Comment 2 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2010-11-16 00:39:47 UTC
What is your locale setting?
Comment 3 Akos Szalkai 2010-11-16 00:57:04 UTC
Good question. :)  Only LC_CTYPE is set to en_US.UTF-8, the others are unset.
Comment 4 Anthony Basile gentoo-dev 2013-08-03 14:41:54 UTC
this doesn't look right and i can reproduce any locale problems.  i'm going to close this obsolete since its an older bug, but please feel free to reopen if this is still an issue.