<br><br><div class="gmail_quote">2012/7/9 Peter Dyballa <span dir="ltr"><<a href="mailto:Peter_Dyballa@web.de" target="_blank">Peter_Dyballa@web.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Am 09.07.2012 um 09:48 schrieb Yvon Thoraval:<br>
<div class="im"><br>
> ** WARNING ** Failed to convert input string to UTF16...<br>
<br>
</div>This can come from hyperref. Its README explains:<br>
<br>
Default for the encoding of bookmarks is `pdfencoding=auto'.<br>
That means the strings are always treated as unicode strings.<br>
Only if the string restricts to the printable ASCII set,<br>
it is written as ASCII string. The reason is that the<br>
\special does not support PDFDocEncoding.<br>
<br>
XeTeX uses the program xdvipdfmx for PDF output generation.<br>
This program behaves a little different from dvipdfm, because<br>
of the supported Unicode characters. Strings for bookmarks<br>
or information entries can be output directly. The<br>
big chars (char code > 255) are written in UTF-8 and<br>
xdvipdfmx tries to convert them to UTF-16BE. However<br>
hyperref already provides PDF strings encoded in UTF-16BE,<br>
thus the result is a warning<br>
<div class="im"> "Failed to convert input string to UTF16..."<br>
</div> The best way would be, if xdvipdfm could detect the<br>
byte order marker (\376\377) and skips the conversion<br>
if that marker is present.<br>
For the time being I added the following to hyperref,<br>
when option `pdfencoding=auto' is set (default for XeTeX):<br>
The string is converted back to big characters thus that the<br>
string is written as UTF-8. But I am very unhappy with this<br>
solution. Main disadvantage:<br>
Two versions of \pdfstringdef are needed:<br>
a) The string is converted back to big characters for<br>
the "tainted keys" of xdvipdfmx (spc_pdfm.c: default_taintkeys).<br>
The subset hyperref uses is /Title, /Author, /Subject,<br>
/Keywords, /Creator, /Producer, /T. Any changes of this<br>
set in xdvipdfmx cannot be detected by hyperref.<br>
b) Without conversion for the other strings , providing UTF16be<br>
directly. Examples: Prefix of page labels, some elements<br>
of formulars.<br>
Thus *each* application that uses \pdfstringdef now must<br>
check, if it defines a string for some of the tainted keys.<br>
If yes, then the call of \pdfstringdef should be preceded<br>
by "\csname HyPsd@XeTeXBigCharstrue\endcsname".<br>
Example: package bookmark.<br>
<br>
So it should not happen – but it happens! To me it happens when I use accented characters (German ä, ö, ü,...) directly. My workaround was to use \"a etc. Another cause can be that some auxiliary files are polluted. So I'd recommend to remove these auxiliary files first, run xelatex a few times and the see if this removes the issue.<br>
<br>
>From my experience I think that an up-to-date TeX Live 2011 does not show such reports.<br>
<br>
<br>
The still allocated memory objects are an xdvipdfm problem. An up-to-date xdvipdfm works, according to my experience, better.<br>
<br>
--<br>
Greetings<br>
<br>
Pete<br>
<br>
The day Microsoft makes something that doesn't suck is the day they start selling vacuum cleaners.<br>
– Ernest Jan Plugge<br>
<br>
<br>----------- Please Consult the Following Before Posting -----------<br>
TeX FAQ: <a href="http://www.tex.ac.uk/faq" target="_blank">http://www.tex.ac.uk/faq</a><br>
List Reminders and Etiquette: <a href="http://email.esm.psu.edu/mac-tex/" target="_blank">http://email.esm.psu.edu/mac-tex/</a><br>
List Archive: <a href="http://tug.org/pipermail/macostex-archives/" target="_blank">http://tug.org/pipermail/macostex-archives/</a><br>
TeX on Mac OS X Website: <a href="http://mactex-wiki.tug.org/" target="_blank">http://mactex-wiki.tug.org/</a><br>
List Info: <a href="http://email.esm.psu.edu/mailman/listinfo/macosx-tex" target="_blank">http://email.esm.psu.edu/mailman/listinfo/macosx-tex</a><br>
<br>
<br></blockquote></div><br><div><br></div><div>Thanks a lot for your precise and long answer.</div><div>However, I'm actually using TeXLive 2012...</div><div><br></div><div>I do have also a \newcommand (commented out by % actually because buggy) :</div>
<div>\definecolor{gris}{rgb}{0.7,0.7,0.7}</div><div>\newcommand{\sectiongris}[1]{\section{\colorbox{gris}{#1}}}</div><div><br></div><div>which gives, in acrobat reader bookmarks part of some commands...</div><div>something like "color push gray color0colorpop<font color="#ff0000">Introduction générale</font>griscolor push gray color0 color poptowidthheightdepth"</div>
<div><br></div><div>where the \section texte is the red one above "<span style="color:rgb(255,0,0)">Introduction générale</span>"</div><div><br></div><div>I'll look at that this afternoon</div><div><br></div>
<div>best</div><div><br></div>