Re: UTF-8 stdio in `gdb --interpreter=mi`?
Eli Zaretskii <eliz-mXXj517/[email protected]> Mon, 11 May 2020 20:18:21 +0300
| Newsgroups | gmane.comp.gnu.mingw.user |
|---|---|
| Message-ID | <[email protected]> |
> From: Alkis Georgopoulos <[email protected]> > Date: Mon, 11 May 2020 20:00:26 +0300 > > I tested on Linux and gdb uses unicode there You probably did that on a system whose default locale is UTF-8. In any other locale you will have similar problems on Unix as well. > I only have minimal experience with gdb so I might be wrong, but from > what I understand, `gdb --interpreter=mi` allows gdb to communicate with > an external program via its stdio. It's not just about filenames; all > other commands, error messages etc will be affected. That's true, but all GDB commands are pure-ASCII strings. > Most windows program nowadays properly support unicode. > ANSI isn't used much except for old programs compiled for windows 9x. > So I'm not sure why gdb can't support unicode, at least optionally. "Unicode" on Windows means UTF-16, not UTF-8. And UTF-16 is fundamentally incompatible with C/C++ 'char *' strings, so teaching GDB to use what Windows calls "Unicode" is not an easy feat. We are better off waiting for Windows to adopt UTF-8 as one of the first-class citizens, like any ANSI codepage. > If `gdb --interpreter=mi` can accept UTF-16 in its stdio It cannot, not without extensive changes. _______________________________________________ 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