From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19633 invoked by alias); 27 Aug 2010 15:21:58 -0000 Received: (qmail 19620 invoked by uid 22791); 27 Aug 2010 15:21:56 -0000 X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_40,RCVD_ILLEGAL_IP,SARE_SUB_ENC_UTF8 X-Spam-Check-By: sourceware.org Received: from imr4.ericy.com (HELO imr4.ericy.com) (198.24.6.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 27 Aug 2010 15:21:50 +0000 Received: from eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) by imr4.ericy.com (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id o7RFRnPt030600; Fri, 27 Aug 2010 10:27:53 -0500 Received: from EUSAACMS0703.eamcs.ericsson.se ([169.254.1.134]) by eusaamw0711.eamcs.ericsson.se ([147.117.20.178]) with mapi; Fri, 27 Aug 2010 11:21:25 -0400 From: Marc Khouzam To: "'Tom Tromey'" , "'gdb@sourceware.org'" Date: Fri, 27 Aug 2010 15:21:00 -0000 Subject: RE: UTF-8 not working for MI? Message-ID: References: In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00159.txt.bz2 > -----Original Message----- > From: Tom Tromey [mailto:tromey@redhat.com]=20 > Sent: Friday, August 20, 2010 2:51 PM > To: Marc Khouzam > Cc: 'gdb@sourceware.org' > Subject: Re: UTF-8 not working for MI? Sorry for the delay. > >>>>> "Marc" =3D=3D Marc Khouzam writes: >=20 > Marc> Or maybe using "interpreter-exec mi" does not quite=20 > give the true > Marc> MI interpreter? >=20 > I dug harder and found this: >=20 > static void > mi_command_loop (int mi_version) > { > /* Turn off 8 bit strings in quoted output. Any character with the > high bit set is printed using C's octal format. */ > sevenbit_strings =3D 1; >=20 >=20 > So, you can reproduce this situation from the CLI by "set print > sevenbit-strings on" before invoking the MI command. > > It is an oddity that currently an MI consumer must check gdb's host > charset in order to know how to decode its output. I would recommend > that the client force it to be UTF-8, but I think this=20 > currently may not work with PHONY_ICONV. Thanks for taking the time! I'm not sure how PHONY_ICONV works, but I'm guessing you meant that it may cause trouble when GDB is used from Eclipse. I just tried using "set print sevenbit-strings off" in Eclipse I can see the proper UTF-8 characters returned by GDB. So it seems like a good solution. I'd like to use this solution but I'm concerned at why MI conciously uses sevenbit-strings? Maybe there is a reason behind it and I'm going to shoot myself in the foot by ignoring it? Thanks Marc