UTF-8 stdio in `gdb --interpreter=mi`?
Alkis Georgopoulos <[email protected]> Mon, 11 May 2020 18:13:39 +0300
| Newsgroups | gmane.comp.gnu.mingw.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, the open source Visual Studio Code IDE integrates greatly with mingw, except for the following culprit: https://github.com/Microsoft/vscode-cpptools/issues/3444#issuecomment-626623778 Specifically, vscode runs `gdb --interpreter=mi` and then passes commands in UTF-8, while gdb expects them in ANSI encoding. So commands like the following fail (Έγγραφα is Documents in Greek): (gdb) 1-environment-cd Έγγραφα 1^error,msg="\353\232\232\250\230\255\230: No such file or directory." One workaround could be for vscode to pass commands in gdb using the ANSI encoding (I tested something similar and it works). But ANSI is limited to 255 characters, it wouldn't work for all files. Another workaround would be to enable "ANSI UTF-8 encoding for non Unicode programs" in Windows regional settings (intl.cpl). But this is a beta feature, and it would break old ANSI programs. So, question: Is there any way to tell gdb that the mi commands it receives are in UTF-8? If not, can it be implemented, even with some command line flag if necessary? Thanks, Alkis Georgopoulos _______________________________________________ MinGW-Users mailing list [email protected] This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. _______________________________________________ You may change your MinGW Account Options or unsubscribe at: https://lists.osdn.me/mailman/listinfo/mingw-users Also: mailto:[email protected]?subject=unsubscribe