/usr/share/gtk-doc/html/ctpl/ch01s05.html is in libctpl-doc 0.3.3.dfsg-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Input and output encoding</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="CTPL Reference Manual">
<link rel="up" href="ch01.html" title="CTPL overview">
<link rel="prev" href="environment-description-syntax.html" title="Environment description syntax">
<link rel="next" href="ch02.html" title="API reference">
<meta name="generator" content="GTK-Doc V1.17 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="environment-description-syntax.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">CTPL Reference Manual</th>
<td><a accesskey="n" href="ch02.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="section">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="idp5510272"></a>Input and output encoding</h2></div></div></div>
<p>
CTPL does no encoding conversion magic for you. The main reason for this
is that it's a complex task to handle encodings properly, and it has a
cost in performances. Moreover, CTPL can (should) work with any
US-ASCII-compatible encoding, which includes UTF-8, ISO-8859-*, and many
others — but not UTF-16, UTF-32 and a few others.
</p>
<p>
Since CTPL will not convert anything for you, you must ensure that
the encoding of the input template and the environment are the same to
avoid mixed encodings in the output.
</p>
<p>
To convert the input data, you can use a
<a href="/usr/share/gtk-doc/html/gio/gio-GConverterInputstream.html#GConverterInputStream">GConverterInputStream</a>
and/or
a <a href="/usr/share/gtk-doc/html/gio/gio-GConverterOutputstream.html#GConverterOutputStream">GConverterOutputStream</a>
together with a
<a href="/usr/share/gtk-doc/html/gio/GCharsetConverter.html">GCharsetConverter</a> as the input
or output source to do an implicit charset conversion directly on reads
and/or writes.
You can of course also do a manual conversion, with
<a href="/usr/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html#g-convert">g_convert()</a> or
<a href="/usr/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html#g-iconv">g_iconv()</a> for example.
</p>
<p>
The recommended encoding for the data to pass to CTPL is UTF-8, but, as
said above, any US-ASCII-compatible encoding should work perfectly
fine.
</p>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.17</div>
</body>
</html>
|