[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115386: * dbus.texi (Type Conversion): Clarify unib
From: |
Michael Albinus |
Subject: |
[Emacs-diffs] trunk r115386: * dbus.texi (Type Conversion): Clarify unibyte-ness of strings. |
Date: |
Thu, 05 Dec 2013 15:34:35 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115386
revision-id: address@hidden
parent: address@hidden
committer: Michael Albinus <address@hidden>
branch nick: trunk
timestamp: Thu 2013-12-05 16:34:30 +0100
message:
* dbus.texi (Type Conversion): Clarify unibyte-ness of strings.
modified:
doc/misc/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6331
doc/misc/dbus.texi dbus.texi-20091113204419-o5vbwnq5f7feedwu-7963
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog 2013-11-30 18:34:58 +0000
+++ b/doc/misc/ChangeLog 2013-12-05 15:34:30 +0000
@@ -1,3 +1,7 @@
+2013-12-05 Michael Albinus <address@hidden>
+
+ * dbus.texi (Type Conversion): Clarify unibyte-ness of strings.
+
2013-11-30 Glenn Morris <address@hidden>
* Makefile.in (distclean): Remove Makefile.
=== modified file 'doc/misc/dbus.texi'
--- a/doc/misc/dbus.texi 2013-07-03 07:51:34 +0000
+++ b/doc/misc/dbus.texi 2013-12-05 15:34:30 +0000
@@ -1138,10 +1138,11 @@
(@var{INTEGER} ((@var{STRING} @var{BOOL} @var{BOOL}) (@var{STRING} @var{BOOL}
@var{BOOL}) @dots{}))
@end lisp
address@hidden dbus-byte-array-to-string byte-array
address@hidden dbus-byte-array-to-string byte-array &optional multibyte
If a D-Bus method or signal returns an array of bytes, which are known
to represent an UTF8 string, this function converts @var{byte-array}
-to the corresponding string. Example:
+to the corresponding string. The string is unibyte encoded, unless
address@hidden is address@hidden Example:
@lisp
(dbus-byte-array-to-string '(47 101 116 99 47 104 111 115 116 115))
@@ -1151,20 +1152,30 @@
@end defun
@defun dbus-unescape-from-identifier string
-Retrieve the original string from the encoded @var{string}.
address@hidden must have been coded with
+Retrieve the original string from the encoded @var{string} as unibyte
+string. @var{string} must have been encoded with
@code{dbus-escape-as-identifier}. Example:
@lisp
(dbus-unescape-from-identifier "_30123abc_5fxyz_01_ff")
address@hidden
address@hidden "0123abc_xyz^Aÿ"
address@hidden ifinfo
address@hidden
address@hidden "0123abc_xyz^A@"y"
address@hidden ifnotinfo
address@hidden lisp
address@hidden "0123abc_xyz\x01\xff"
address@hidden lisp
+
+If the original string used in @code{dbus-escape-as-identifier} is a
+multibyte string, it cannot be expected that this function returns
+that string:
+
address@hidden
+(string-equal
+ (dbus-unescape-from-identifier
+ (dbus-escape-as-identifier "Grüß Göttin"))
+ "Grüß Göttin")
+
address@hidden nil
address@hidden lisp
+
+
@end defun
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115386: * dbus.texi (Type Conversion): Clarify unibyte-ness of strings.,
Michael Albinus <=