From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Desilets, Alain" Newsgroups: gmane.emacs.help Subject: Converting string to Unicode Date: Fri, 4 Nov 2005 09:02:52 -0500 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1131114881 32146 80.91.229.2 (4 Nov 2005 14:34:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 4 Nov 2005 14:34:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 04 15:34:40 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EY2dK-0004HC-IK for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Nov 2005 15:33:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EY2dJ-0004Nf-BL for geh-help-gnu-emacs@m.gmane.org; Fri, 04 Nov 2005 09:33:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EY29j-0003Jj-BK for help-gnu-emacs@gnu.org; Fri, 04 Nov 2005 09:02:59 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EY29e-0003H4-GI for help-gnu-emacs@gnu.org; Fri, 04 Nov 2005 09:02:58 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EY29d-0003Gd-VQ for help-gnu-emacs@gnu.org; Fri, 04 Nov 2005 09:02:54 -0500 Original-Received: from [132.246.15.80] (helo=nrccenexf1.nrc.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EY29d-0008T6-Mn for help-gnu-emacs@gnu.org; Fri, 04 Nov 2005 09:02:53 -0500 Original-Received: from nrccenexb1.nrc.ca ([132.246.15.96]) by nrccenexf1.nrc.ca with Microsoft SMTPSVC(6.0.3790.1830); Fri, 4 Nov 2005 09:02:52 -0500 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Converting string to Unicode Thread-Index: AcXhSHMgcQI6ZBZYQFOs5qVACViusA== Original-To: X-OriginalArrivalTime: 04 Nov 2005 14:02:52.0794 (UTC) FILETIME=[72AFB5A0:01C5E148] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30824 Archived-At: I am working on an Emacs mode for programming by voice (i.e. dictating = computer code using speech recognition system): http://voicecode.iit.nrc.ca/ This mode communicates with the speech recognition engine (an = application outside of Emacs) through XML messages over socket = connections. In particular, whenever a new character is typed into Emacs, Emacs sends = an XML message to the SR system to notify it. This XML message contains = the character that was typed as well as the name of the buffer and the = position where it was typed. Whenever I typed an accented character in Emacs, the XML message that = gets generated turns out to be malformed, because the character that was = typed is inserted into the XML message as a byte sequence that uses the = original encoding of that character in the buffer, as opposed to the = unicode encoding that the XML message is supposed to be encoded with. So my question is this. What would be the easiest way for me to take a = character that was inserted into an Emacs buffer, and turn it into a = unicode character to be inserted in the XML message? Thx Alain D=E9silets, MASc=20 Agent de recherches/Research Officer=20 Institut de technologie de l'information du CNRC /=20 NRC Institute for Information Technology=20 alain.desilets@nrc-cnrc.gc.ca=20 T=E9l/Tel (613) 990-2813=20 Facsimile/t=E9l=E9copieur: (613) 952-7151=20 Conseil national de recherches Canada, M50, 1200 chemin Montr=E9al,=20 Ottawa (Ontario) K1A 0R6=20 National Research Council Canada, M50, 1200 Montreal Rd., Ottawa, ON=20 K1A 0R6=20 Gouvernement du Canada | Government of Canada=20 =20