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

Dose not support chinese character? #275

Closed
wss29 opened this issue Jul 5, 2023 · 2 comments · Fixed by #276
Closed

Dose not support chinese character? #275

wss29 opened this issue Jul 5, 2023 · 2 comments · Fixed by #276

Comments

@wss29
Copy link

wss29 commented Jul 5, 2023

Hi,
I have a simple C++ file, and I want to debug it in vscode, the path of the C++ file has some Chinese characters, and when I debug I get an error
image
my project folder is as follows
image
It seems that cdt-gdb-vscode does not recognize ‘测试’, and give a series of number which is not in my project
when I change ‘测试’ to English character it is ok… . how to fix it?

@jonahgraham
Copy link
Contributor

Thank you @wss29 for the bug report. I can indeed reproduce this. It looks like we are missing some escaping in the the adapter. I am transferring this issue to that repo.

@jonahgraham jonahgraham transferred this issue from eclipse-cdt-cloud/cdt-gdb-vscode Jul 5, 2023
jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 5, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
@jonahgraham
Copy link
Contributor

I have started with #276 which is a test that demonstrates the problem. I'm working on a fix next.

jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 5, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 5, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 5, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 5, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 5, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
jonahgraham added a commit to jonahgraham/cdt-gdb-adapter that referenced this issue Jul 19, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly escaping these strings.

Fixes eclipse-cdt-cloud#275
jonahgraham added a commit that referenced this issue Jul 21, 2023
GDB is escaping unicode characters leading to the messages coming
back from GDB not being understood correctly.

For example, hitting a breakpoint on issue-275-测试.c comes back
from GDB as `file="issue-275-\346\265\213\350\257\225.c"` but by
the time we send it to DAP client we are sending
`"name":"issue-275-346265213350257225.c"`

This patchset supports properly handling these escaped strings.

Fixes #275
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

Successfully merging a pull request may close this issue.

2 participants