1Encode::X11(3)        User Contributed Perl Documentation       Encode::X11(3)
2
3
4

NAME

6       Encode::X11 -- character encodings for X11
7

SYNOPSIS

9        use Encode;
10        use Encode::X11;
11        my $chars = Encode::decode ('x11-compound-text', $bytes);
12

DESCRIPTION

14       This module encodes and decodes X11 ICCCM "compound text" strings.
15
16           x11-compound-text
17
18       Compound text is found in window properties of type "COMPOUND_TEXT".
19       It's not usual to use it outside that context.  Compound text consists
20       of ISO-2022 style escape sequences switching among various basic
21       charsets, including the ISO-8859 series, JIS, KSC, and GB.
22
23       The plain name "x11-compound-text" tries to encode in a sensible and
24       compatible way.  Perhaps in the future there'll be some options or
25       variations for which charsets to use.  For now encoding prefers the
26       original ICCCM charsets latin-N, JIS, KSC and GB for the benefit of
27       older X clients, then the newer utf-8 encoding when necessary.
28
29       The decode is meant to recognise anything, but may be a bit limited
30       yet.  Perhaps it could be just a full ISO-2022 decode, if/when that
31       might exist, but for now it's done explicitly and might potentially
32       cope with X11 specifics.
33
34       Decoding cns11643 segments requires the "Encode::HanExtra" module.
35       Such segments are not normally generated by the Xlib conversions (as of
36       X.org libX11 1.4.0).  Have HanExtra available if you think you might
37       encounter them.
38
39       Emacs has some "private encoding" sequences for big5.  They're not
40       supported currently.
41
42       When working with compound text you might in fact not want to convert
43       it to Perl wide chars.  If drawing with the core X requests then split
44       it into segments of the various charsets and find a font for each
45       encoding.  Some oopery could no doubt represent such a breakdown and
46       have things like concatenate or compare.  That would work almost
47       directly with the bytes without converting.
48

SEE ALSO

50       Encode, Encode::HanExtra
51
52       "Compound Text Encoding" specification,
53       /usr/share/doc/xorg-docs/ctext/ctext.txt.gz,
54       <http://www.x.org/docs/CTEXT/ctext.pdf>
55

HOME PAGE

57       <http://user42.tuxfamily.org/x11-protocol-other/index.html>
58

LICENSE

60       Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde
61
62       X11-Protocol-Other is free software; you can redistribute it and/or
63       modify it under the terms of the GNU General Public License as
64       published by the Free Software Foundation; either version 3, or (at
65       your option) any later version.
66
67       X11-Protocol-Other is distributed in the hope that it will be useful,
68       but WITHOUT ANY WARRANTY; without even the implied warranty of
69       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
70       General Public License for more details.
71
72       You should have received a copy of the GNU General Public License along
73       with X11-Protocol-Other.  If not, see <http://www.gnu.org/licenses/>.
74
75
76
77perl v5.30.1                      2020-01-30                    Encode::X11(3)
Impressum