From user-return-19567-archive-asf-public=cust-asf.ponee.io@karaf.apache.org Fri Nov 9 05:42:46 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id A82D3180671 for ; Fri, 9 Nov 2018 05:42:45 +0100 (CET) Received: (qmail 96907 invoked by uid 500); 9 Nov 2018 04:42:44 -0000 Mailing-List: contact user-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@karaf.apache.org Delivered-To: mailing list user@karaf.apache.org Received: (qmail 96897 invoked by uid 99); 9 Nov 2018 04:42:43 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Nov 2018 04:42:43 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8572CC2277 for ; Fri, 9 Nov 2018 04:42:43 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.3 X-Spam-Level: X-Spam-Status: No, score=0.3 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id C0MFfWpa2puj for ; Fri, 9 Nov 2018 04:42:41 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 76409623F3 for ; Fri, 9 Nov 2018 04:42:41 +0000 (UTC) X-Originating-IP: 82.238.224.4 Received: from [192.168.134.109] (bre91-1-82-238-224-4.fbx.proxad.net [82.238.224.4]) (Authenticated sender: jb@nanthrax.net) by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 2F4E7FF804 for ; Fri, 9 Nov 2018 04:42:40 +0000 (UTC) Subject: Re: Karaf SSH invalid encoding To: user@karaf.apache.org References: From: =?UTF-8?Q?Jean-Baptiste_Onofr=c3=a9?= Message-ID: Date: Fri, 9 Nov 2018 05:42:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 8bit Hi Nicolas, Let me check but AFAIR, null should use the default term encoding of the system. Regards JB On 08/11/2018 14:20, DUTERTRY Nicolas wrote: > Hi, > > � > > I�m using Karaf 4.2.1 on environments which doesn�t have a UTF-8 > encoding for instance Windows 10 or AIX with ISO-8859-1 encoding. > > When I open a SSH session with the �client� script or with another SSH > client, the non-ascii characters are not displayed correctly. > > For instance the result of the �bundle:list� command prints �?� instead > of �|� : > > � > > karaf@root()> bundle:list > > START LEVEL 100 , List Threshold: 50 > > ID ? State� ? Lvl ? Version ? Name > > ????????????????????????????????????????????????????????????????????????? > > 23 ? Active ?� 80 ? 4.2.1�� ? Apache Karaf :: OSGi Services :: Event > > � > > After some investigations I have found that the class > org.apache.karaf.shell.ssh.SshTerminal has a hard coded UTF-8 value in > its constructor : > > � > > public SshTerminal(Environment environment, InputStream input, > OutputStream output) throws IOException { > > ���� super("Karaf SSH terminal", > > ��������� � environment.getEnv().get(Environment.ENV_TERM), > > ��������� � input, > > ��������� � output, > > ��������� � StandardCharsets.UTF_8); > > � > > I have replaced StandardCharsets.UTF_8 with null and when running Karaf > with this modification, I do not have the character issue anymore. > > � > > Do you think it is a valid correction ? I can open a jira ticket if you > want. > > � > > Regards, > > -- > > Nicolas Dutertry > -- Jean-Baptiste Onofr� jbonofre@apache.org http://blog.nanthrax.net Talend - http://www.talend.com