[ 
https://issues.apache.org/jira/browse/KARAF-6695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17109922#comment-17109922
 ] 

Nate commented on KARAF-6695:
-----------------------------

Oh right, I probably should have updated you sooner.

So turns out that when I checked the previous karaf 4.0.7, I didn't notice that 
we placed 
{code:java}
export LC_ALL="en_US.UTF-8"{code}
inside the [servicename]-service script, because apparently we had this issue 
before. So I check our own Jira (private hosted, so I can't share 
unfortunately) and we had already encountered this issue back in 2014, and used 
this oneliner fix for it. Turns out that it worked like this in Karaf 4.0.7 as 
well.

> Karaf 4.2.8 installed as a service on CentOS 7 uses POSIX as the locale 
> instead of UTF-8 like in 4.0.7 or in a non-service install
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-6695
>                 URL: https://issues.apache.org/jira/browse/KARAF-6695
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.8
>         Environment: CentOS 7 Core
> [user@hostname bin]$ hostnamectl
>  Static hostname: hostname
>  Icon name: computer-vm
>  Chassis: vm
>  Machine ID: f71a935b20b249c8bdfdbc7d0dfd0c99
>  Boot ID: d4936791e0724265aa940fdfcf5e618e
>  Virtualization: kvm
>  Operating System: CentOS Linux 7 (Core)
>  CPE OS Name: cpe:/o:centos:centos:7
>  Kernel: Linux 3.10.0-1062.12.1.el7.x86_64
>  Architecture: x86-64
>            Reporter: Nate
>            Assignee: Jean-Baptiste Onofré
>            Priority: Major
>             Fix For: 4.3.0, 4.2.10
>
>
> I'm testing Karaf 4.2.8 running as a service on CentOS 7 using the 
> karaf:wrapper feature. A problem I encountered is that in this new version, 
> SSHing into the console and running 
> {code:java}
> exec locale{code}
> returns POSIX as the locale for everything:
> {code:java}
> karaf@root()> shell:exec locale
> LANG=
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL={code}
> . This is different from the locale of the user that the karaf server is 
> running as (which is en-us.UTF-8 or something like that), and also different 
> from the value in karaf 4.0.7 running as a service, the version I upgraded 
> from (also UTF-8) and also different from running it using 
> /bin/karaf-server.sh (also UTF-8). For me, this causes an issue when doing a 
> svn checkout from a karaf feature/bundle, because the svn repository is in 
> UTF-8 and Subversion can't deal with the client and server having different 
> locales. I imagine there will be other issues as well with other programs I'd 
> like to run from Karaf.
> For now, I can work around it by manually changing my locale through an exec, 
> but I can't really ask that of my end users. I feel like it's not really 
> intended that Karaf runs under a different locale based on whether it's been 
> started as a service or not. I also think this might be a regression. At any 
> rate, even if it's intended, I'm hoping there is a workaround like a startup 
> script I can edit so the locale is always UTF-8.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to