From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bvWB4-00043K-Aj for qemu-devel@nongnu.org; Sat, 15 Oct 2016 17:07:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bvWB1-0008RC-6M for qemu-devel@nongnu.org; Sat, 15 Oct 2016 17:07:34 -0400 Received: from mx3-phx2.redhat.com ([209.132.183.24]:39347) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bvWB0-0008PM-V3 for qemu-devel@nongnu.org; Sat, 15 Oct 2016 17:07:31 -0400 Date: Sat, 15 Oct 2016 17:07:23 -0400 (EDT) From: Paolo Bonzini Message-ID: <554335893.3770945.1476565643777.JavaMail.zimbra@redhat.com> In-Reply-To: <20161015195308.20473-5-samuel.thibault@ens-lyon.org> References: <20161015195308.20473-1-samuel.thibault@ens-lyon.org> <20161015195308.20473-5-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/5] curses: add option to specify VGA font encoding List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Samuel Thibault Cc: qemu-devel@nongnu.org, kraxel@redhat.com, berrange@redhat.com, peter maydell , mjt@tls.msk.ru > +#ifdef CONFIG_ICONV > + if (font_charset) { > + unsigned char ch; > + wchar_t wch; > + char *pch, *pwch; > + size_t sch, swch; > + iconv_t conv; > + > + conv = iconv_open("WCHAR_T", font_charset); Is this portable? It seems safer to convert to UTF-8 and parse the resulting character (assuming that wchar_t is Unicode). There is already mod_utf8_codepoint for this task. Paolo