unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Parsing of multibyte strings frpom process output
@ 2018-05-08 10:02 Michael Albinus
  0 siblings, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2018-05-08 10:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hi,

I call a local process ("gio list ...", to name it), which returns utf8
multibyte codes like

--8<---------------cut here---------------start------------->8---
standard::symlink-target=/home/albinus/tmp/\xc2\x9abung
--8<---------------cut here---------------end--------------->8---

The bytes "\xc2\x9a" stand for the multibyte char ?\x9a. However, I
don't know how to parse it that I could retrieve it. All what I have
tried returns always the *two* characters ?\xc2 ?\x9a, multibyte
encoded. How could I get just the multibyte character ?\x9a from this?

I know that (decode-coding-string "/home/albinus/tmp/\xc2\x9a\ bung" 'utf-8)
does what I want. But here, the string is a string *constant*, which
allows to write characters in hex syntax. When I read the string from
the output buffer (after including the trailing "\ "), this does not work.

Best regards, Michael.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-05-08 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.13544.1525773753.27995.help-gnu-emacs@gnu.org>
2018-05-08 11:00 ` Parsing of multibyte strings frpom process output Helmut Eller
2018-05-08 12:01   ` Michael Albinus
2018-05-08 12:21     ` Noam Postavsky
2018-05-08 12:47       ` Michael Albinus
2018-05-08 10:02 Michael Albinus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).