vector090
vector090

Reputation: 118

How to let Chinese char in text file shown correctly under Cygwin?

In favor of English interface, so set LANG=en_US, but the Chinese characters in text files are shown as unrecognizable blocks, making me unable to use cat or tail to trace logs.

I see setting LANG=zh_CN will help, but it changes the program output to Chinese too (e.g. date etc.), which is not desirable. How can I keep English interface yet support Chinese text content?

Upvotes: 2

Views: 1029

Answers (1)

James Fu
James Fu

Reputation: 496

This should get what you need:

export LANG=en_US.UTF-8

export LC_CTYPE=zh_CN

Upvotes: 1

Related Questions