Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 345229 - app-admin/webapp-config fails to write content file with non-ascii filenames
Summary: app-admin/webapp-config fails to write content file with non-ascii filenames
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
Depends on:
Reported: 2010-11-12 18:51 UTC by Akos Szalkai
Modified: 2013-08-03 14:41 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

UTF-8 encode filenames written to the content file. (webapp-config-utf8.diff,428 bytes, patch)
2010-11-12 18:54 UTC, Akos Szalkai
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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/!
* 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 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.