Apache2 + mod_passenger Bazaar repository wrong commit messages encoding
Added by Halega Digy almost 14 years ago
I have a Bazaar repository with Russian commit messages (in UTF-8). When I import a repository in redmine running with sudo ruby scripts/server webrick -e production
, all is OK. But when I try to import repository in redmine running on Apache2/Passenger, all Russian commit messages becomes question marks (? ???? ???).
What's wrong?
Environment¶
- Ubuntu Server 11.04 (with of the box versions of Apache2, MySQL, libapache2-mod-passenger)
- Redmine 1.2.0
- Ruby 1.8.7
- RubyGems 1.3.7
- Rails 2.3.11
- Rack 1.1.2
- Rake 0.8.7
- Bazaar 2.3.1
- System locale: en_US.UTF-8
- MySQL database encoding is UTF-8
Apache site's configuration:
PassengerDefaultUser www-data SetEnv X_DEBIAN_SITEID "default" <Directory "/var/www/redmine"> RailsBaseURI /redmine RailsEnv production PassengerResolveSymlinksInDocumentRoot on </Directory>
Replies (4)
RE: Apache2 + mod_passenger Bazaar repository wrong commit messages encoding
-
Added by Halega Digy almost 14 years ago
If I import Mercurial repo with Russian commit messages It's OK in both cases (running on webrick and Apache).
RE: Apache2 + mod_passenger Bazaar repository wrong commit messages encoding
-
Added by Toshi MARUYAMA almost 14 years ago
Redmine forks "bzr log".
"bzr log" encoding depends on locale (LANG environment variable).
RE: Apache2 + mod_passenger Bazaar repository wrong commit messages encoding
-
Added by Halega Digy almost 14 years ago
Thanks! I found that default Apache configuration has LANG=C by in Ubuntu Server 11.04.
In /etc/apache2/envvars
file need to uncomment the corresponding line:
... ## The locale used by some modules like mod_dav export LANG=C ## Uncomment the following line to use the system default locale insted: #. /etc/default/locale ...
And now all commit messages (as well as Russian file names) are displayed correctly.
File sizes are shown as "?" in repository¶
Another problem is left: all file sizes are shown as question marks "?". I tryed three Redmine configurations: Apache+Passenger, webrick and Bitnami Redmine module (in Ubuntu Server virtual machine). Only in Bitnami configuration file sizes are shown correctly (Apache and webrick display "?").
RE: Apache2 + mod_passenger Bazaar repository wrong commit messages encoding
-
Added by luigifab ! almost 13 years ago
This bug appear also with Redmine 1.3.3.
Other solution (for example with Lighttpd) is : dpkg-reconfigure locales