telesoho / vscode-markdown-paste-image

Smartly paste for Markdown.
MIT License
135 stars 41 forks source link

Chinese will be convert to ? after pasting #10

Closed DaemondShu closed 6 years ago

DaemondShu commented 6 years ago

Under Macosx 10.12.6 image PS: 我看得懂中文

telesoho commented 6 years ago

@MonkeyDAsce The extension use pbcopy and pdpaste command on IOS. You need to check pdpaste work fine on your MacOSX Terminal.

你能看懂中文最好了,按照下面文章的设定貌似能解决这个问题: http://blog.vgod.tw/2008/01/09/%E5%9C%A8macosx-terminal%E4%B8%AD%E4%BD%BF%E7%94%A8%E5%89%AA%E8%B2%BC%E7%B0%BF/

DaemondShu commented 6 years ago

image

My pbcopy and pdpaste commands are OK, but my vscode didn't work.

telesoho commented 6 years ago

@MonkeyDAsce I found there is a bug report in copy-paste, but it doesn't fixed yet. The same problem has been found in other extension that use copy-paste. Chinese encoding problem when using mdmath.clipToHtml

VS Code doesn't set "LC_CTYPE" environment variable.

We won't fix this in VS Code because that fix would only work while developing an application that uses "clipboardy" inside VS Code. If this application is deployed (outside of VS Code) the fix would no longer be available and the application would fail. So it is the responsibility of the application to deal with the missing "LC_CTYPE" environment variable.

The more detail see: Microsoft/vscode#26502 (comment)

May be I should use 'clipboardy' to replace 'copy-paste'.

telesoho commented 6 years ago

@MonkeyDAsce I have release a new version, Could you help me to check It work or not.

DaemondShu commented 6 years ago

No, the new version doesn't work. It is the same as before.

DaemondShu commented 6 years ago

Is there a problem? May your new version didn't take effect. The extension always need "reload" no matter how many times I reload/restart VScode. image

DaemondShu commented 6 years ago

Yeah, maybe it was my fault. The new version worked after I reinstalled the extension. Thank you very much!