karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré ...@nanthrax.net>
Subject Re: Karaf SSH invalid encoding
Date Tue, 13 Nov 2018 13:08:18 GMT
Hi,

Thanks for the update.

Which Karaf version are you using (especially for the client) ?

Did you try with 4.2.2-SNAPSHOT as we did a fix around that already ?

Regards
JB

On 13/11/2018 12:37, Miroslav Beranič wrote:
> Hi JB,
> 
> so I am now back in a mode, that ??? char is printed.
> 
> Output is like this:
> karaf@root()> user-list
> #  ? Id                                  ?
> Email                               ? First name   ?
MSISDN
> ?????????????????????????????????????????????????????????????????????????????????????????????????????????
> 1  ? bla                                
> ?                                     ? bla         
?
> 2  ? bla                                
> ?                                     ? bla         
?
> 3  ? bla                                 ? bla@bla.com
> <mailto:bla@bla.com>                         ? bla         
?
> 4  ? bla                                 ? bla@bla.com
> <mailto:bla@bla.com>                         ? bla         
?
> 
> Env variables are the same as before:
> karaf@root()> shell:echo
> $LANG                                                                                                                                                                                    
> 
> en_US.UTF-8
> karaf@root()>  shell:echo
> $LC_ALL                                                                                                                                                                                  
> 
> null
> karaf@root()> shell:echo
> $TERM                                                                                                                                                                                     
> 
> xterm-256color
> 
> 
> Kind Regards,
> Miroslav
> 
> 
> 
> 
> V V pon., 12. nov. 2018 ob 10:49 je oseba Miroslav Beranič
> <miroslav.beranic@mibesis.si <mailto:miroslav.beranic@mibesis.si>> napisala:
> 
>     Hi JB,
> 
>     I get this ( from Linux shell ):
> 
>     [mm@mm1 ~]$ echo $LC_ALL
> 
>     [mm@mm1 ~]$ echo $LANG
>     en_US.UTF-8
>     [mm@mm1 ~]$ echo $TERM
>     xterm-256color
>     [mm@mm1 ~]$
> 
>     From inside Karaf's Shell:
> 
>     karaf@root()> shell:echo $LANG
>     en_US.UTF-8
>     karaf@root()> shell:echo $LC_ALL
>     null
>     karaf@root()> shell:echo $TERM
>     xterm-256color
>     karaf@root()>    
> 
>     This is when ??? is not present - it is working. I will post back
>     when I get/see ??? .
> 
>     Kind Regards,
>     Miroslav
> 
> 
> 
>     V V pon., 12. nov. 2018 ob 09:44 je oseba Jean-Baptiste Onofré
>     <jb@nanthrax.net <mailto:jb@nanthrax.net>> napisala:
> 
>         Hi Miroslav,
> 
>         can you share the LC_ALL, LANG and TERM env variables when you
>         have or
>         don't have the issue ?
> 
>         Thanks,
>         Regards
>         JB
> 
>         On 12/11/2018 08:33, Miroslav Beranič wrote:
>         > Hi all,
>         >
>         > I have the same issue on Apache Karaf 4.2.2 ( commit
>         > da7ae8f76f2db1347200ff6bb4760e4ecbb1b454 ), I get/see ???
>         chars ( 95% of
>         > the times ) when I redeploy application.
>         >
>         > Interesting thing is, this is on one instance only running
>         RHEL 7.5.
>         > Intermediate server environment ( beta server ).
>         >
>         > At this time, I solve this with server ( OS ) restart.
>         >
>         > But if someone has any other observation or hints to fix - I
>         would be
>         > glad to update :)
>         >
>         > Kind Regards,
>         > Miroslav
>         >
>         >
>         > V V pet., 9. nov. 2018 ob 05:42 je oseba Jean-Baptiste Onofré
>         > <jb@nanthrax.net <mailto:jb@nanthrax.net>
>         <mailto:jb@nanthrax.net <mailto:jb@nanthrax.net>>> napisala:
>         >
>         >     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 <mailto:jbonofre@apache.org>
>         <mailto:jbonofre@apache.org <mailto:jbonofre@apache.org>>
>         >     http://blog.nanthrax.net
>         >     Talend - http://www.talend.com
>         >
>         >
>         >
>         > --
>         > Miroslav Beranič
>         > MIBESIS
>         > +386(0)40/814-843
>         > miroslav.beranic@mibesis.si
>         <mailto:miroslav.beranic@mibesis.si>
>         <mailto:miroslav.beranic@mibesis.si
>         <mailto:miroslav.beranic@mibesis.si>>
>         > http://www.mibesis.si
> 
>         -- 
>         Jean-Baptiste Onofré
>         jbonofre@apache.org <mailto:jbonofre@apache.org>
>         http://blog.nanthrax.net
>         Talend - http://www.talend.com
> 
> 
> 
>     -- 
>     Miroslav Beranič
>     MIBESIS
>     +386(0)40/814-843
>     miroslav.beranic@mibesis.si <mailto:miroslav.beranic@mibesis.si>
>     http://www.mibesis.si
> 
> 
> 
> -- 
> Miroslav Beranič
> MIBESIS
> +386(0)40/814-843
> miroslav.beranic@mibesis.si <mailto:miroslav.beranic@mibesis.si>
> http://www.mibesis.si

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Mime
View raw message