<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>poreencode — Translate Toolkit 1.9.0 documentation</title> <link rel="stylesheet" href="../_static/basic.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="../_static/bootstrap.css" type="text/css" /> <link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../', VERSION: '1.9.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/bootstrap.js"></script> <script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script> <link rel="top" title="Translate Toolkit 1.9.0 documentation" href="../index.html" /> <link rel="up" title="Converters" href="index.html" /> <link rel="next" title="posplit" href="posplit.html" /> <link rel="prev" title="popuretext" href="popuretext.html" /> </head> <body> <div id="navbar" class="navbar navbar-fixed-top"> <div class="navbar-inner"> <div class="container-fluid"> <a class="brand" href="../index.html">Translate Toolkit</a> <span class="navbar-text pull-left"><b>1.9.0</b></span> <ul class="nav"> <li class="divider-vertical"></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Site <b class="caret"></b></a> <ul class="dropdown-menu globaltoc"><ul class="simple"> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../features.html">Features</a></li> <li class="toctree-l1"><a class="reference internal" href="../installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="index.html">Converters</a></li> <li class="toctree-l1"><a class="reference internal" href="index.html#tools">Tools</a></li> <li class="toctree-l1"><a class="reference internal" href="index.html#scripts">Scripts</a></li> <li class="toctree-l1"><a class="reference internal" href="../guides/index.html">Use Cases</a></li> <li class="toctree-l1"><a class="reference internal" href="../formats/index.html">Supported formats</a></li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../styleguide.html">Translate Styleguide</a></li> <li class="toctree-l1"><a class="reference internal" href="../styleguide.html#documentation">Documentation</a></li> <li class="toctree-l1"><a class="reference internal" href="../development/building.html">Building</a></li> <li class="toctree-l1"><a class="reference internal" href="../development/contributing.html">Contributing</a></li> <li class="toctree-l1"><a class="reference internal" href="../development/developers.html">Translate Toolkit Developers Guide</a></li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../api/index.html">API</a></li> </ul> <ul> <li class="toctree-l1"><a class="reference internal" href="../changelog.html">Important Changes</a></li> <li class="toctree-l1"><a class="reference internal" href="../history.html">History of the Translate Toolkit</a></li> <li class="toctree-l1"><a class="reference internal" href="../license.html">License</a></li> </ul> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Page <b class="caret"></b></a> <ul class="dropdown-menu localtoc"><ul> <li><a class="reference internal" href="#">poreencode</a><ul> <li><a class="reference internal" href="#prerequisites">Prerequisites</a></li> <li><a class="reference internal" href="#usage">Usage</a></li> <li><a class="reference internal" href="#operation">Operation</a></li> <li><a class="reference internal" href="#bugs">Bugs</a></li> </ul> </li> </ul> </ul> </li> <li><a href="popuretext.html" title="previous chapter">« popuretext</a></li> <li><a href="posplit.html" title="next chapter">posplit »</a></li> </ul> <form class="navbar-search pull-right" action="../search.html" method="get"> <input type="text" name="q" placeholder="Search" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </ul> </div> </div> </div> </div> <div class="container content"> <div class="section" id="poreencode"> <span id="id1"></span><h1>poreencode<a class="headerlink" href="#poreencode" title="Permalink to this headline">¶</a></h1> <p>Takes a directory of existing PO files and converts them to a given encoding.</p> <div class="section" id="prerequisites"> <span id="poreencode-prerequisites"></span><h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2> <p>GNU Gettext</p> </div> <div class="section" id="usage"> <span id="poreencode-usage"></span><h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2> <div class="highlight-python"><pre>poreencode <encoding> <PO directory></pre> </div> <p>Where:</p> <table border="1" class="docutils"> <colgroup> <col width="19%" /> <col width="81%" /> </colgroup> <tbody valign="top"> <tr class="row-odd"><td>encoding</td> <td>is the encoding you would like to convert to e.g. UTF-8</td> </tr> <tr class="row-even"><td>PO directory</td> <td>is a directory of existing PO files</td> </tr> </tbody> </table> <p>It is best to backup files before the conversion or to perform it against CVS which prevents a potential loss of data.</p> </div> <div class="section" id="operation"> <span id="poreencode-operation"></span><h2>Operation<a class="headerlink" href="#operation" title="Permalink to this headline">¶</a></h2> <p>poreencode makes use of the Gettext tool <a class="reference external" href="http://linux.die.net/man/1/msgconv">msgconv</a> to perform its task. It traverses the PO directory and finds all PO file. It uses msgconv to convert the PO file from its existing encoding to the new encoding.</p> </div> <div class="section" id="bugs"> <span id="poreencode-bugs"></span><h2>Bugs<a class="headerlink" href="#bugs" title="Permalink to this headline">¶</a></h2> <p>Like most Gettext tools they do a little bit more than documented, msgconv will decide which strings are in fact fuzzy and delete fuzzy marking – not a lot but you do need to diff (this probably related to #, fuzzy entries that are not placed in the place Gettext expects them).</p> </div> </div> </div> <hr> <footer class="footer"> <div class="container"> <p class="pull-right"><a href="#">Back to top ↑</a></p> <ul class="unstyled muted"> <li><small> © 2012, Translate.org.za.<br/> </small></li> <li><small> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </small></li> </ul> </div> </footer> </body> </html>