texstudio icon indicating copy to clipboard operation
texstudio copied to clipboard

Chinese characters are showing uncorrectly in message panel. (消息窗口的中文字符显示乱码)

Open zzeitt opened this issue 2 years ago • 5 comments

Environment

  • TeXstudio: 4.2.2
  • Qt: 6.2.3
  • OS: Windows 10
  • TeX distribution: texlive

Expected behavior

In the message panel which locates at the bottom-left of the whole window, the Chinese character should display correctly just as the software UI's character do.

Actual behavior

The characters which were typed in by user just became distorted in message panel. For example, '你好' became '浣犲ソ'. The following illustration is more straight-forward.

VeryCapture_20220315170216

How to reproduce

  1. Install Git and configure it on TeXStudio.
  2. Open a new tex file.
  3. From Menu Bar, select Files > SVN/GIT > check in.
  4. Enter some Chinese words like '你好' as commit comments.
  5. The distorted characters should show up in message panel.

(Screen recording...)

VeryCapture_texstudio

zzeitt avatar Mar 15 '22 09:03 zzeitt

Have you tried to use git on a console/cmd ? Does that work correctly ?

sunderme avatar Mar 15 '22 17:03 sunderme

I tried. It works well on Powershell/CMD/Git Bash.

image

By the way, I used to use git in integrated console of VS Code, where the document editing and the version controlling could be done smoothly.

When I migrated to TeXstudio, I realized that using a integrated git in TXS is not easy (this comment). So I tried to configure git on TXS and use the built-in check in command. Then the problem appeared.

zzeitt avatar Mar 16 '22 02:03 zzeitt

Seems a decoding issue. 浣犲ソ comes from decoding a UTF8 encoded 你好 with GB18030.

muzimuzhi avatar Mar 18 '22 01:03 muzimuzhi

Seems a decoding issue. 浣犲ソ comes from decoding a UTF8 encoded 你好 with GB18030.

Any suggest about where to configure this encoding & decoding? Or is it a software-side problem?

zzeitt avatar Mar 18 '22 02:03 zzeitt

txs assumes that the local code page is used for cmd output. so I am not sure if win used GB18030 and git ignores it or windows actually used utf8 and QT misses that.

sunderme avatar Mar 19 '22 18:03 sunderme