* Re: displaying escaped unicode files
[not found] <mailman.6822.1158077825.9609.help-gnu-emacs@gnu.org>
@ 2006-09-13 0:19 ` B. T. Raven
2006-09-13 3:15 ` Gulliver7
2006-09-13 8:33 ` Peter Dyballa
0 siblings, 2 replies; 8+ messages in thread
From: B. T. Raven @ 2006-09-13 0:19 UTC (permalink / raw)
"Gulliver7" <rpontisso@yahoo.co.uk> wrote in message
news:mailman.6822.1158077825.9609.help-gnu-emacs@gnu.org...
>
> Hi. I'm using emacs as a text editor (I'm not a programmer), and need
some
> advice:
>
> I'm running emacs 21.3 in Windows, and need to read and edit some text
files
> with UTF-8 encoding and others with escaped unicode encoding. I've
managed
> to get emacs to display the UTF-8 files correctly, but not the escaped
> unicode ones. The alphabet is Latin, but accented characters are not
being
> displayed properly in the escaped unicode files. What do I need to do
to
> get emacs to display the characters properly, regardless of whether I go
> into a UTF-8 or an escaped unicode file?
>
> I have to say, I don't really understand what what the coding means --
all I
> know is that I have these files to work with and want to use emacs to
edit
> them. I'd appreciate any help.
>
> Thank you
> --
> View this message in context:
http://www.nabble.com/displaying-escaped-unicode-files-tf2259865.html#a626
9354
> Sent from the Emacs - Help forum at Nabble.com.
If escaped unicode is a sequence of hexadecimal tetrads like \x00c0 or
\u00ce then David Love's ucs-tables.el could be used to convert them to
the glyphs at the corresponding Unicode code points by reading each "word"
or token in the file and then passing it to ucs-insert. You would then see
the foreign language character as long as you had an appropriate font or
font-set installed. I've heard that we have to wait for Emacs 23 before we
see seamless Unicode support. Even version 22 (CVS) handles these
characters better than the version I use (21.3). It's common to see
escaped octal representations with version 22.0 probably because the unify
on encoding and decoding aren't folding together the "same" characters
produced using different input methods.
Ed
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: displaying escaped unicode files
2006-09-13 0:19 ` displaying escaped unicode files B. T. Raven
@ 2006-09-13 3:15 ` Gulliver7
2006-09-13 8:33 ` Peter Dyballa
1 sibling, 0 replies; 8+ messages in thread
From: Gulliver7 @ 2006-09-13 3:15 UTC (permalink / raw)
B. T. Raven-2 wrote:
>
>
> "Gulliver7" wrote
>> I'm running emacs 21.3 in Windows, and need to read and edit some text
> files
>> with UTF-8 encoding and others with escaped unicode encoding. I've
> managed
>> to get emacs to display the UTF-8 files correctly, but not the escaped
>> unicode ones. The alphabet is Latin, but accented characters are not
> being
>> displayed properly in the escaped unicode files. What do I need to do
> to
>> get emacs to display the characters properly, regardless of whether I go
>> into a UTF-8 or an escaped unicode file?
>
>> View this message in context:
> http://www.nabble.com/displaying-escaped-unicode-files-tf2259865.html#a626
> 9354
>
> If escaped unicode is a sequence of hexadecimal tetrads like \x00c0 or
> \u00ce then David Love's ucs-tables.el could be used to convert them to
> the glyphs at the corresponding Unicode code points by reading each "word"
> or token in the file and then passing it to ucs-insert. You would then see
> the foreign language character as long as you had an appropriate font or
> font-set installed. I've heard that we have to wait for Emacs 23 before we
> see seamless Unicode support.
>
> Ed
>
Thank you for your reply. I've looked at a description of "ucs-tables.el",
and I think I need things described in layman's terms.
Is this a plugin of some sort for emacs that will convert the characters
into something readable? If so, what happens when I use emacs to edit the
file? Will the characters retain their unicode-ness to satisfy the
applications that require the \uXXXX format? And how will any new accented
characters be encoded?
Thank you.
--
View this message in context: http://www.nabble.com/displaying-escaped-unicode-files-tf2259865.html#a6278274
Sent from the Emacs - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: displaying escaped unicode files
2006-09-13 0:19 ` displaying escaped unicode files B. T. Raven
2006-09-13 3:15 ` Gulliver7
@ 2006-09-13 8:33 ` Peter Dyballa
1 sibling, 0 replies; 8+ messages in thread
From: Peter Dyballa @ 2006-09-13 8:33 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 13.09.2006 um 02:19 schrieb B. T. Raven:
> the unify on encoding and decoding aren't folding together the
> "same" characters produced using different input methods.
It's getting better. You can type for example C-s ä RET and search
for an ``ä´´ in few encodings – but still not in all! (I should
submit another bug report on this ...)
--
Greetings
Pete
Globalisation -- communism from above.
^ permalink raw reply [flat|nested] 8+ messages in thread
* displaying escaped unicode files
@ 2006-09-12 16:17 Gulliver7
2006-09-12 18:12 ` Kevin Rodgers
0 siblings, 1 reply; 8+ messages in thread
From: Gulliver7 @ 2006-09-12 16:17 UTC (permalink / raw)
Hi. I'm using emacs as a text editor (I'm not a programmer), and need some
advice:
I'm running emacs 21.3 in Windows, and need to read and edit some text files
with UTF-8 encoding and others with escaped unicode encoding. I've managed
to get emacs to display the UTF-8 files correctly, but not the escaped
unicode ones. The alphabet is Latin, but accented characters are not being
displayed properly in the escaped unicode files. What do I need to do to
get emacs to display the characters properly, regardless of whether I go
into a UTF-8 or an escaped unicode file?
I have to say, I don't really understand what what the coding means -- all I
know is that I have these files to work with and want to use emacs to edit
them. I'd appreciate any help.
Thank you
--
View this message in context: http://www.nabble.com/displaying-escaped-unicode-files-tf2259865.html#a6269354
Sent from the Emacs - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: displaying escaped unicode files
2006-09-12 16:17 Gulliver7
@ 2006-09-12 18:12 ` Kevin Rodgers
2006-09-13 2:58 ` Gulliver7
[not found] ` <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 8+ messages in thread
From: Kevin Rodgers @ 2006-09-12 18:12 UTC (permalink / raw)
Gulliver7 wrote:
> Hi. I'm using emacs as a text editor (I'm not a programmer), and need some
> advice:
>
> I'm running emacs 21.3 in Windows, and need to read and edit some text files
> with UTF-8 encoding and others with escaped unicode encoding. I've managed
> to get emacs to display the UTF-8 files correctly, but not the escaped
> unicode ones. The alphabet is Latin, but accented characters are not being
> displayed properly in the escaped unicode files. What do I need to do to
> get emacs to display the characters properly, regardless of whether I go
> into a UTF-8 or an escaped unicode file?
>
> I have to say, I don't really understand what what the coding means -- all I
> know is that I have these files to work with and want to use emacs to edit
> them. I'd appreciate any help.
What is an "escaped unicode" file? Can you attach a small sample file
to your reply?
--
Kevin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: displaying escaped unicode files
2006-09-12 18:12 ` Kevin Rodgers
@ 2006-09-13 2:58 ` Gulliver7
[not found] ` <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 8+ messages in thread
From: Gulliver7 @ 2006-09-13 2:58 UTC (permalink / raw)
Kevin Rodgers wrote:
>
> Gulliver7 wrote:
>> I'm running emacs 21.3 in Windows, and need to read and edit some text
>> files
>> with UTF-8 encoding and others with escaped unicode encoding. I've
>> managed
>> to get emacs to display the UTF-8 files correctly, but not the escaped
>> unicode ones. The alphabet is Latin, but accented characters are not
>> being
>> displayed properly in the escaped unicode files. What do I need to do to
>> get emacs to display the characters properly, regardless of whether I go
>> into a UTF-8 or an escaped unicode file?
>
> What is an "escaped unicode" file? Can you attach a small sample file
> to your reply?
>
According to the folks at Mozilla, Escaped Unicode Encoding uses the unicode
representation \uXXXX.
I've attached a small file with characters encoded in this way. It includes
three "special" characters:
a "u" with a circumflex, an "a" with a circumflex, and a "c" with a cedilla.
I can't get emacs to read them properly: they appear, respectively, as:
"\u00FB", "\u00E2", "\u00E7"
If you can get emacs to read the file properly, please let me know how you
did it.
Thanks
http://www.nabble.com/user-files/235986/escapedunicode.properties
escapedunicode.properties
--
View this message in context: http://www.nabble.com/displaying-escaped-unicode-files-tf2259865.html#a6278180
Sent from the Emacs - Help forum at Nabble.com.
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>]
* Re: displaying escaped unicode files
[not found] ` <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>
@ 2006-09-13 4:15 ` B. T. Raven
2006-09-13 22:29 ` Miles Bader
1 sibling, 0 replies; 8+ messages in thread
From: B. T. Raven @ 2006-09-13 4:15 UTC (permalink / raw)
"Gulliver7" <rpontisso@yahoo.co.uk> wrote in message
news:mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org...
>
>
> Kevin Rodgers wrote:
> >
> > Gulliver7 wrote:
> >> I'm running emacs 21.3 in Windows, and need to read and edit some
text
> >> files
> >> with UTF-8 encoding and others with escaped unicode encoding. I've
> >> managed
> >> to get emacs to display the UTF-8 files correctly, but not the
escaped
> >> unicode ones. The alphabet is Latin, but accented characters are not
> >> being
> >> displayed properly in the escaped unicode files. What do I need to
do to
> >> get emacs to display the characters properly, regardless of whether I
go
> >> into a UTF-8 or an escaped unicode file?
> >
> > What is an "escaped unicode" file? Can you attach a small sample file
> > to your reply?
> >
>
> According to the folks at Mozilla, Escaped Unicode Encoding uses the
unicode
> representation \uXXXX.
>
> I've attached a small file with characters encoded in this way. It
includes
> three "special" characters:
> a "u" with a circumflex, an "a" with a circumflex, and a "c" with a
cedilla.
>
> I can't get emacs to read them properly: they appear, respectively, as:
> "\u00FB", "\u00E2", "\u00E7"
>
> If you can get emacs to read the file properly, please let me know how
you
> did it.
>
> Thanks
>
> http://www.nabble.com/user-files/235986/escapedunicode.properties
> escapedunicode.properties
>
M-x ucs-insert is for manual insertion of arbitrary (or at least the ones
included in alists in ucs-tables.el) unicode characters. This function is
defined toward the end of ucs-tables.el. If just the sets of four hex
digits are entered in the mini-buffer (one set at a time), the characters
ûâç
are inserted at point.
This is not a plug-in but just an interactive function that can be invoked
with Meta-x. It's designed for manual, one at a time, insertion of
characters, not for rendering a whole file.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: displaying escaped unicode files
[not found] ` <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>
2006-09-13 4:15 ` B. T. Raven
@ 2006-09-13 22:29 ` Miles Bader
1 sibling, 0 replies; 8+ messages in thread
From: Miles Bader @ 2006-09-13 22:29 UTC (permalink / raw)
Gulliver7 <rpontisso@yahoo.co.uk> writes:
> http://www.nabble.com/user-files/235986/escapedunicode.properties
> escapedunicode.properties
If you have the previously mentioned `ucs-insert' function (either by
running Emacs 22, or from Dave Love's code for earlier emacs), you can
use a simple function like the following to do the whole buffer:
(defun expand-ucs-escapes ()
(interactive)
(save-excursion
(goto-char (point-min))
(while (re-search-forward "[\\]u\\([0-9a-f][0-9a-f][0-9a-f][0-9a-f]\\)"
nil t)
(let ((code (match-string 1)))
(delete-region (match-beginning 0) (match-end 0))
(ucs-insert code)))))
[Invoke it as "M-x expand-ucs-escapes" or bind it to a key or something.]
-Miles
--
"1971 pickup truck; will trade for guns"
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-09-13 22:29 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.6822.1158077825.9609.help-gnu-emacs@gnu.org>
2006-09-13 0:19 ` displaying escaped unicode files B. T. Raven
2006-09-13 3:15 ` Gulliver7
2006-09-13 8:33 ` Peter Dyballa
2006-09-12 16:17 Gulliver7
2006-09-12 18:12 ` Kevin Rodgers
2006-09-13 2:58 ` Gulliver7
[not found] ` <mailman.6847.1158116285.9609.help-gnu-emacs@gnu.org>
2006-09-13 4:15 ` B. T. Raven
2006-09-13 22:29 ` Miles Bader
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.