.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Encode::X11 3pm" .TH Encode::X11 3pm "2019-08-26" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Encode::X11 \-\- character encodings for X11 .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& use Encode; \& use Encode::X11; \& my $chars = Encode::decode (\*(Aqx11\-compound\-text\*(Aq, $bytes); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module encodes and decodes X11 \s-1ICCCM\s0 \*(L"compound text\*(R" strings. .PP .Vb 1 \& x11\-compound\-text .Ve .PP Compound text is found in window properties of type \f(CW\*(C`COMPOUND_TEXT\*(C'\fR. It's not usual to use it outside that context. Compound text consists of \&\s-1ISO\-2022\s0 style escape sequences switching among various basic charsets, including the \s-1ISO\-8859\s0 series, \s-1JIS, KSC,\s0 and \s-1GB.\s0 .PP The plain name \*(L"x11\-compound\-text\*(R" tries to encode in a sensible and compatible way. Perhaps in the future there'll be some options or variations for which charsets to use. For now encoding prefers the original \&\s-1ICCCM\s0 charsets latin-N, \s-1JIS, KSC\s0 and \s-1GB\s0 for the benefit of older X clients, then the newer utf\-8 encoding when necessary. .PP The decode is meant to recognise anything, but may be a bit limited yet. Perhaps it could be just a full \s-1ISO\-2022\s0 decode, if/when that might exist, but for now it's done explicitly and might potentially cope with X11 specifics. .PP Decoding cns11643 segments requires the \f(CW\*(C`Encode::HanExtra\*(C'\fR module. Such segments are not normally generated by the Xlib conversions (as of X.org libX11 1.4.0). Have HanExtra available if you think you might encounter them. .PP Emacs has some \*(L"private encoding\*(R" sequences for big5. They're not supported currently. .PP When working with compound text you might in fact not want to convert it to Perl wide chars. If drawing with the core X requests then split it into segments of the various charsets and find a font for each encoding. Some oopery could no doubt represent such a breakdown and have things like concatenate or compare. That would work almost directly with the bytes without converting. .SH "SEE ALSO" .IX Header "SEE ALSO" Encode, Encode::HanExtra .PP \&\*(L"Compound Text Encoding\*(R" specification, \&\fI/usr/share/doc/xorg\-docs/ctext/ctext.txt.gz\fR, .SH "HOME PAGE" .IX Header "HOME PAGE" .SH "LICENSE" .IX Header "LICENSE" Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde .PP X11\-Protocol\-Other is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. .PP X11\-Protocol\-Other is distributed in the hope that it will be useful, but \&\s-1WITHOUT ANY WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or \s-1FITNESS FOR A PARTICULAR PURPOSE.\s0 See the \s-1GNU\s0 General Public License for more details. .PP You should have received a copy of the \s-1GNU\s0 General Public License along with X11\-Protocol\-Other. If not, see .