Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265946 - www-servers/resin-3.1.x does not obey locale as given by enviornment
Summary: www-servers/resin-3.1.x does not obey locale as given by enviornment
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-13 05:59 UTC by Alexander Hoogerhuis
Modified: 2009-05-15 21:25 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Hoogerhuis 2009-04-13 05:59:11 UTC
When starting resin 3.1.x it will not obey environment variables such as LANG and LC_* when setting up the locale under whish it runs. Currently the only usable way i've found so far is to hack /etc/init.d/resin and fix the cmdline variable to prefix the environment variables when bootstrapping resin:

local cmdline="LANG=nb_NO.utf8 LC_MESSAGES=en_US.utf8 ${JAVA_HOME}/bin/java -jar /usr/share/resin/lib/resin.jar [etc]"

running export of these variables in the shell before starting resin has no effect, and setting them via env.d ditto.

This causes a lot of issues with WTF8 apps.

-A

Reproducible: Always

Steps to Reproduce:
1. Amend /etc/init.d/resin as above fixes the issue

Actual Results:  
Without amending any WTF8 enabled apps will print WTF8 characters as double byte latin1 charachters on webpages.

Expected Results:  
Expected would be for resin's init script to honor LANG/LC_* as given in the environment when starting resin and passing these to resin.
Comment 1 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-05-01 22:17:43 UTC
Could you try resin-3.2.1 ?
Comment 2 Alexander Hoogerhuis 2009-05-01 23:04:47 UTC
No, the problem is we run several apps that are certified with resin 3.1.x, so we cant more. If there is any difference in the startup scripts I would try a 3.2.x release, and then if that makes a difference, assist in backporting whatever needs to be done to the 3.1.x init scripts.
Comment 3 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-05-03 15:13:20 UTC
Do you have LANG and LC_MESSAGES set in /etc/env.d/* files, or in .bash* for root user?
Comment 4 Alexander Hoogerhuis 2009-05-03 15:59:34 UTC
 They are unset, and are being set manually by "export LANG" and "export LC_*" prior to attempting to start resin by "/etc/init.d/resin start".

-A
Comment 5 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-05-03 16:05:20 UTC
Note that /etc/init.d/resin uses `su -', please set locales information globally (in /etc/env.d/*).
Comment 6 Alexander Hoogerhuis 2009-05-03 16:29:47 UTC
OK, will test this shortly.

-A
Comment 7 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-05-10 14:01:34 UTC
Alexander: has the issue been resolved with setting locales globally?
Comment 8 Krzysztof Pawlik (RETIRED) gentoo-dev 2009-05-15 21:25:19 UTC
Alexander: please reopen if the issue persists.