Skip to content

locales on SONiC #1681

Closed
Closed
@richard28530

Description

@richard28530

currently SONiC has no locales configured.

while you ssh from a terminal with en_US.UTF-8, then the env LANG is injected as en_US.UTF-8.
while you ssh from a terminal with zh_CN.UTF-8, then the env LANG is injected as zh_CN.UTF-8.

when LANG is injected as zh_CN.UTF-8, when try to completion with TAB on command line, it will prompt "-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)" serveral times

admin@Accton-AS7712-32X:~$
admin@Accton-AS7712-32X:~$ sc
scp           script        scriptreplay
admin@Accton-AS7712-32X:~$ scp -bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)
-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)
-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)
-bash: warning: setlocale: LC_CTYPE: cannot change locale (zh_CN.UTF-8)

Accton-AS7712-32X:  localhost:
admin@Accton-AS7712-32X:~$ scp

two way to fix this:

  1. disable sshd receive locale from remote
  2. configure an default locale

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions