summaryrefslogtreecommitdiff
path: root/src/xfns.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2003-01-27 01:04:03 +0000
committerKenichi Handa <handa@m17n.org>2003-01-27 01:04:03 +0000
commit3201ea579bbe3a9bc2f6bf9d6c9b2121f6bbe2b1 (patch)
tree7acce5f565b56e19825446a97071c4f7f24f6066 /src/xfns.c
parent231a33160ed418f73dea4f0972e469c8cdd64c13 (diff)
downloademacs-3201ea579bbe3a9bc2f6bf9d6c9b2121f6bbe2b1.tar.gz
(x_set_name, x_set_title): Add comment about encoding strategy.
Diffstat (limited to 'src/xfns.c')
-rw-r--r--src/xfns.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e7f339198c8..9612d1c80ce 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2517,6 +2517,20 @@ x_set_name (f, name, explicit)
int bytes, stringp;
Lisp_Object coding_system;
+ /* Note: Encoding strategy
+
+ We encode NAME by compound-text and use "COMPOUND-TEXT" in
+ text.encoding. But, there are non-internationalized window
+ managers which don't support that encoding. So, if NAME
+ contains only ASCII and 8859-1 characters, encode it by
+ iso-latin-1, and use "STRING" in text.encoding hoping that
+ such window manager at least analize this format correctly,
+ i.e. treat 8-bit bytes as 8859-1 characters.
+
+ We may also be able to use "UTF8_STRING" in text.encoding
+ in the feature which can encode all Unicode characters.
+ But, for the moment, there's no way to know that the
+ current window manager supports it or not. */
coding_system = Qcompound_text;
text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp);
text.encoding = (stringp ? XA_STRING
@@ -2530,6 +2544,7 @@ x_set_name (f, name, explicit)
}
else
{
+ /* See the above comment "Note: Encoding strategy". */
icon.value = x_encode_text (f->icon_name, coding_system, 0,
&bytes, &stringp);
icon.encoding = (stringp ? XA_STRING
@@ -2630,6 +2645,7 @@ x_set_title (f, name, old_name)
Lisp_Object coding_system;
coding_system = Qcompound_text;
+ /* See the comment "Note: Encoding strategy" in x_set_name. */
text.value = x_encode_text (name, coding_system, 0, &bytes, &stringp);
text.encoding = (stringp ? XA_STRING
: FRAME_X_DISPLAY_INFO (f)->Xatom_COMPOUND_TEXT);
@@ -2642,6 +2658,7 @@ x_set_title (f, name, old_name)
}
else
{
+ /* See the comment "Note: Encoding strategy" in x_set_name. */
icon.value = x_encode_text (f->icon_name, coding_system, 0,
&bytes, &stringp);
icon.encoding = (stringp ? XA_STRING