Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Glitch of chinese appearance in output of VIEW command #659

Open
Serenade600 opened this issue Jan 29, 2024 · 3 comments
Open

Glitch of chinese appearance in output of VIEW command #659

Serenade600 opened this issue Jan 29, 2024 · 3 comments

Comments

@Serenade600
Copy link

Environment

  • project (cli, server, browser-extension): cli
  • version: 15.0
  • operating system: Win10

Description

My content of note 11 is

这是第一条工作总结了。
这个工具看起来还是不错的。

,which appears correctly in external editor. This note is in book ‘working_summary’. But if I input dnote view working_summary in powershell or CMD,the output is
image
.The output lost the first three chinese character "这是第" of the first line of this note.

Steps to reproduce

Please test

这是第一条工作总结了。
这个工具看起来还是不错的。
@Serenade600 Serenade600 changed the title Wrong chinese appearance in output of VIEW command Glitch of chinese appearance in output of VIEW command Jan 29, 2024
@sungwoncho
Copy link
Member

Hi @Serenade600, I suspect that this issue is not specific to Chinese characters but to Windows and Powershell (fatih/color#169) because I couldn't reproduce it on Linux. Therefore I upgraded a dependency to apply a patch (https://github.com/fatih/color/releases/tag/v1.15.0) and created a new release for the CLI (v0.15.1).

Could you try to upgrade to the latest version of the CLI (v0.15.1) and try again?

@Serenade600
Copy link
Author

Hi @sungwoncho. I tried the latest CLI v0.15.1. The output of dnote view working_summary was like
image
. Compared to v0.15.0, the output improves. The squares and 33m around [---More---] disappeared. But the first three characters of first line is still lost. The output of dnote view 11 seems correct like

  • book name: working_summary
  • created at: Jan 29, 2024 11:54pm (CST)
  • updated at: Jan 30, 2024 12:11am (CST)
  • note id: 11
  • note uuid: 283219e8-26da-4694-b0ae-350fcc574465

------------------------content------------------------
这是第一条工作总结了。
这个工具看起来还是不错的。
-------------------------------------------------------

@sungwoncho
Copy link
Member

Thanks for trying the new release. I suspect that this issue is related to how Dnote interacts with Powershell. Below is what it should look like in Linux:

dnote v testbook
  • on book testbook
  (1882) 这是第一条工作总结了。 [---More---]
                                                                             
dnote v 1882
  • book name: testbook
  • created at: Feb 10, 2024 10:48am (AEDT)
  • note id: 1882
  • note uuid: 5262d719-e15a-4225-a8a8-502aeee6a7ed

------------------------content------------------------
这是第一条工作总结了。
这个工具看起来还是不错的。

-------------------------------------------------------

I went through the source code (https://github.com/dnote/dnote/blob/master/pkg/cli/cmd/ls/ls.go) but found no smoking gun at this point. I will keep this issue open and await any feedback from Powershell users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants