[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Converting string to Unicode
From: |
Desilets, Alain |
Subject: |
Converting string to Unicode |
Date: |
Fri, 4 Nov 2005 09:02:52 -0500 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Converting string to Unicode,
Desilets, Alain <=