question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can log terminal support display Chinese words ?

See original GitHub issue

kubebox obviously is a great k8s tool for our small team.

But when I setup an environment to running kubebox, I found in the logs terminal Chinese words all changed to ???.
The shell windows is OK.

would you please when you are free, task a demo test and debug where is the problem.

the demo test files list:

  1. Dockerfile
FROM docker.io/alpine:3.7

COPY test.log /
COPY run.sh / 
ENV LANG="C.UTF-8"
ENTRYPOINT ["/run.sh"]
  1. run.sh
#!/bin/sh
tail -f -n90 /test.log
  1. test.log
在Docker容器bash中输入中文

在Docker容器bash中输入中文

docker alpine版本服务中显示中文

docker alpine版本服务中显示中文

docker alpine版本服务中显示中文

解决docker容器不支持中文的问题

In browser, log terminal showing:

??Docker????bash??????????                                                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                   │
│??Docker????bash??????????                                                                                                                                                                                                                         │
│                                                                                                                                                                                                                                                   │
│docker alpine??????????????????                                                                                                                                                                                                                    │
│                                                                                                                                                                                                                                                   │
│docker alpine??????????????????                                                                                                                                                                                                                    │
│                                                                                                                                                                                                                                                   │
│docker alpine??????????????????                                                                                                                                                                                                                    │
│                                                                                                                                                                                                                                                   │
│????docker????????????????????                                                                                                                                                                                                                     │

In API direct request show normal result - https://kubebox.xxxx.com/master/api/v1/namespaces/namespace-dev/pods/alpine-cn-5c8584bd96-6klvl/log?follow=true&tailLines=10000&timestamps=true&container=alpine-cn&sinceTime=2019-04-18T08%3A21%3A19.334100106Z:

2019-04-18T08:21:19.333943583Z 在Docker容器bash中输入中文
2019-04-18T08:21:19.333950662Z 
2019-04-18T08:21:19.333954261Z 在Docker容器bash中输入中文
2019-04-18T08:21:19.333958322Z 
2019-04-18T08:21:19.333961629Z docker alpine版本服务中显示中文
2019-04-18T08:21:19.333965169Z 
2019-04-18T08:21:19.333968374Z docker alpine版本服务中显示中文
2019-04-18T08:21:19.333971711Z 
2019-04-18T08:21:19.333974847Z docker alpine版本服务中显示中文
2019-04-18T08:21:19.333978286Z 
2019-04-18T08:21:19.333981377Z 解决docker容器不支持中文的问题

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
astefanutticommented, May 21, 2019

This should be fixed with a4141e193c2e62fc0385f477b95d78c2e32047d4.

Thanks again for the report.

0reactions
593769290commented, May 24, 2019

Beautiful! Thanks so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] display chinese character in a termial
Well, simply you can't! A terminal cannot display two languages or two different font type at a time. Also a terminal accepts only...
Read more >
Why can't my Android Studio terminal display Chinese ...
It may be a font issue. In Android Studio, try going to Settings > Editor > Console Font , then in the Primary...
Read more >
how to display chinese character in BASH shell - Super User
You need UTF-8 encoding to have all Chinese characters displayed correctly. To see your current locale just type locale and you will get...
Read more >
Display of chinese character in the Terminal - Google Groups
In Terminal select Menu: Terminal::Window Settings... and choose 'Display' in the pop-up menu. Then choose UTF-8 in the 'Character Set Encoding' menu and...
Read more >
How to display Chinese characters correctly on remote Red ...
Here comes the solution. · Use luit . (Preferred) · Change the encoding of your terminal. You may considered it since this method...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found