Open nopdan opened 1 year ago
Hello! Could you please clarify this? The extension itself is encoding-oblivious it deals with the JS strings decoded by the editor. So if VSCode supports GBK, then Rainbow CSV should "support" it too. Or are you talking about RBQL?
Hello! Could you please clarify this? The extension itself is encoding-oblivious it deals with the JS strings decoded by the editor. So if VSCode supports GBK, then Rainbow CSV should "support" it too. Or are you talking about RBQL?
If rainbow csv does not take effect, it can be opened normally. After 1 second, it becomes garbled.
Thank you for the demo! Did you try to manually switch the encoding to "GBK" by clicking on the encoding button at the bottom? what happens in that case? Does this still happen with other extensions disabled? Could you also please attach a file here that could be used to reproduce the problem? Thanks!
Thanks! I did some tests with your file and in my case VSCode always opens it with UTF-8 encoding no matter if Rainbow CSV is enabled or not. But if I manually switch the encoding to GBK it fixes the characters and it works with Rainbow CSV too. So I don't think that Rainbow CSV is causing this issue, moreover extensions do not have capability to initiate encoding switch: https://github.com/microsoft/vscode/issues/824.
Thanks! I did some tests with your file and in my case VSCode always opens it with UTF-8 encoding no matter if Rainbow CSV is enabled or not. But if I manually switch the encoding to GBK it fixes the characters and it works with Rainbow CSV too. So I don't think that Rainbow CSV is causing this issue, moreover extensions do not have capability to initiate encoding switch: microsoft/vscode#824.
In my case, when I disable Rainbow CSV extension it becomes normal. Do you set the files.autoGuessEncoding
to true?
Thanks! I did some tests with your file and in my case VSCode always opens it with UTF-8 encoding no matter if Rainbow CSV is enabled or not. But if I manually switch the encoding to GBK it fixes the characters and it works with Rainbow CSV too. So I don't think that Rainbow CSV is causing this issue, moreover extensions do not have capability to initiate encoding switch: microsoft/vscode#824.
I turned off all the extensions except Rainbow CSV and the problem continued. The question seems to be rainbow_csv.enable_separator_autodetection
. How does Rainbow CSV detect separator?
Sorry for the late reply, I was able to reproduce the problem with files.autoGuessEncoding
. I will take a look at it later when I have more time, thanks again for the bug report!
Looks like this is actually related to an issue in the VSCode itself see https://github.com/microsoft/vscode/issues/39084 and https://github.com/microsoft/vscode/issues/127936. And actually, it is possible to reproduce the problem even with Rainbow CSV disabled - if you switch the file type of your file to e.g. 'C++' in the bottom right corner, not only file type would change but encoding too and garble the characters.
Don't support Chinese GBK encoding. It always seems to use utf-8 encoding.