[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Parsing of multibyte strings frpom process output
From: |
Michael Albinus |
Subject: |
Parsing of multibyte strings frpom process output |
Date: |
Tue, 08 May 2018 12:02:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
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.
- Parsing of multibyte strings frpom process output,
Michael Albinus <=