From: "Desilets, Alain" <Alain.Desilets@nrc-cnrc.gc.ca>
Subject: Converting string to Unicode
Date: Fri, 4 Nov 2005 09:02:52 -0500 [thread overview]
Message-ID: <E4D07AB09F5F044299333C8D0FEB45E9BB0CDE@nrccenexb1.nrc.ca> (raw)
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ésilets, MASc
Agent de recherches/Research Officer
Institut de technologie de l'information du CNRC /
NRC Institute for Information Technology
alain.desilets@nrc-cnrc.gc.ca
Tél/Tel (613) 990-2813
Facsimile/télécopieur: (613) 952-7151
Conseil national de recherches Canada, M50, 1200 chemin Montréal,
Ottawa (Ontario) K1A 0R6
National Research Council Canada, M50, 1200 Montreal Rd., Ottawa, ON
K1A 0R6
Gouvernement du Canada | Government of Canada
next reply other threads:[~2005-11-04 14:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-04 14:02 Desilets, Alain [this message]
[not found] <mailman.13934.1131112985.20277.help-gnu-emacs@gnu.org>
2005-11-04 14:33 ` Converting string to Unicode Pascal Bourguignon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E4D07AB09F5F044299333C8D0FEB45E9BB0CDE@nrccenexb1.nrc.ca \
--to=alain.desilets@nrc-cnrc.gc.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.