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

Any plan to support Chinese? #133

Open
ryanhamilton opened this issue Nov 25, 2024 · 10 comments
Open

Any plan to support Chinese? #133

ryanhamilton opened this issue Nov 25, 2024 · 10 comments

Comments

@ryanhamilton
Copy link
Collaborator

user-rz

QStudio/Pulse/SQLNotebook are amazing products! But it seems that QStudio/Pulse/SQLNotebook do not support Chinese encoding in UTF8 or GBK . Is there any plan to support it?

@ryanhamilton
Copy link
Collaborator Author

I thought we did (image below).
What isn't working? and can you outline what I would need to do?

qstudio-utf8

@drzwz
Copy link

drzwz commented Nov 25, 2024

Sorry for not testing it carefully. qStudio/Pulse does support UTF-8 encoded Chinese characters, but cannot directly display GBK characters, which is reasonable. So far, the only problem I have encountered is that I can input Chinese, but QStudio displays it as special characters. probably because I am using Chinese Version of Windows 11.
qstudio

@ryanhamilton
Copy link
Collaborator Author

Thanks for the detail. So I believe in theory:

  1. I can try to find which encoding a user has with System.getProperty(“file.encoding”)
  2. Then I can set the encoding used when displaying a document with this:
    https://docs.oracle.com/javase/8/docs/api/javax/swing/JEditorPane.html#setContentType-java.lang.String-
    It may show those missing characters. But I have no way to test this and if it breaks it may affect others.

Do you have a workaround to generate UTF-8 input reasonably or is this difficult?

@drzwz
Copy link

drzwz commented Nov 26, 2024

Thanks. I will try to generate UTF-8 input.

  1. I change Language & Region settings as following:
    qstudio1

  2. I created a UTF8 file in Notepad, which can be displayed normally in Studio for kdb+(https://github.com/CharlesSkelton/studio), but not in qStudio.
    qstudio2

Where did I go wrong? Thanks.

@drzwz
Copy link

drzwz commented Nov 26, 2024

utf8.txt
utf8.txt

qStudio:
qstudio6
Pulse Dashboard:
qstudio3
Pulse SQLEditor:
qstudio4
Pulse SQLNotebook:
qstudio5

@ryanhamilton
Copy link
Collaborator Author

Brilliant, this easily gives me enough to investigate myself further.

@lalz001
Copy link

lalz001 commented Dec 19, 2024

The default of Code Font is :JetBrains Mono
image
However,in this Font Chinese does not support
image
BY change to other Font like ”华文宋体“,Things go to right
image

@ryanhamilton
Copy link
Collaborator Author

Great detective work @lalz001 not supporting chinese when first launched is too heavy a price to pay for a nice font.
I will revert the default font to monospaced in QStudio 4.03+. Anyone wanting jetbrains mono can set it themselves.

@ryanhamilton
Copy link
Collaborator Author

Should be fixed in 4.03 just released. I'll leave this issue open 2 weeks in case you want to confirm.

@drzwz
Copy link

drzwz commented Dec 26, 2024

Thank you for the fix! The issue remains in Pulse 3.13 (Dashboard/SQL Editor/SQLNotebook).

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

3 participants