From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A4927393BC2C; Thu, 27 Jan 2022 12:26:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A4927393BC2C From: "aburgess at redhat dot com" To: gdb-prs@sourceware.org Subject: [Bug tui/28800] non-ascii character cannot display correctly in tui-mode's extended-prompt Date: Thu, 27 Jan 2022 12:26:20 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: tui X-Bugzilla-Version: 11.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aburgess at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gdb-prs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-prs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jan 2022 12:26:20 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28800 Andrew Burgess changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2022-01-27 CC| |aburgess at redhat dot com --- Comment #2 from Andrew Burgess --- Andreas, This is a slightly different issue you are seeing. I'm guessing you have gdb.prompt_hook set. This ends up calling gdbpy_before_prompt_hook in python.c. If we assume Python 3 for a moment, then in this function we convert the pr= ompt to a unicode object, assuming UTF-8 encoding. This unicode object is then passed to the users python code. If the user returns the same prompt unchanged, or even some other utf-8 enc= oded prompt string, we then convert that string back to bytes using the host_charset. >>From the error message you see, it would appear your hostchar set is maybe 'ascii'? I'm guessing it's certainly not utf-8. You could try: 'set host-charset UTF8' and see if the problem is resolved. The asymmetry in our use of different unicode encodings seems like a bad th= ing to me ... I wonder if we should just fix on one particular scheme, maybe ut= f-8 for some of the cases like this? However, we should probably spin this conversation into a separate bug as t= his is different to the original unicode within tui bug. --=20 You are receiving this mail because: You are on the CC list for the bug.=