* added the Unlicense as valid in misc/share/REGISTER
[t2sde.git] / package / graphic / exact-image / no-utf8-pdf.patch
blob462d526a2fbe84c6dcd8409a1485e9ce6c002a4a
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../exact-image/no-utf8-pdf.patch
5 # Copyright (C) 2009 The T2 SDE Project
6 #
7 # More information can be found in the files COPYING and README.
8 #
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- T2-COPYRIGHT-NOTE-END ---
17 No half-way hocr 2 pdf writing in utf8, yet.
19 Index: codecs/pdf.cc
20 ===================================================================
21 --- ./codecs/pdf.cc (revision 1516)
22 +++ ./codecs/pdf.cc (revision 1515)
23 @@ -711,12 +711,10 @@
24 c << "(";
26 // parse string and use proper escape
27 + // TODO: UTF-8 input parsing
28 // TODO: Unicode mappings
29 bool first_newline = true;
31 - // decode utf8, locally
32 - std::vector<uint32_t> utf8 = DecodeUtf8(text.c_str(), text.size());
33 - for (std::vector<uint32_t>::const_iterator it = utf8.begin(); it != utf8.end(); ++it)
34 + for (std::string::const_iterator it = text.begin(); it != text.end(); ++it)
36 switch (*it)
38 @@ -739,7 +737,7 @@
40 // just copy by default:
41 default:
42 - c << (char)*it;
43 + c << *it;