<?xml version="1.0" encoding="windows-1252"?>
<node id="814135" title="Re^3: mod_perl2 and utf8" created="2009-12-23 13:28:27" updated="2009-12-23 13:28:27">
<type id="11">
note</type>
<author id="381608">
ikegami</author>
<data>
<field name="doctext">
&lt;blockquote&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;i&gt;I would expect $r-&gt;print to accept a string of bytes just like every other print.&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;i&gt;The posted code shows that printing to STDOUT in a cmdline script gives the same result for both strings&lt;/i&gt;
&lt;/blockquote&gt;

&lt;p&gt;I followed up by saying you can instruct &lt;c&gt;print&lt;/c&gt; to accept characters by telling it how to handle them. This is done on a per-handle basis, and that's what you did for &lt;c&gt;STDOUT&lt;/c&gt; with

&lt;c&gt;
binmode STDOUT, ':utf8';
&lt;/c&gt;

&lt;p&gt;You need to do something equivalent with mod_perl's object.

&lt;blockquote&gt;&lt;p&gt;&lt;i&gt;the problem as I see it is that STDOUT under mod_perl2 lacks the utf8-awareness built through the rest of the perl I/O layer, with no way of enabling it.&lt;/i&gt;&lt;/blockquote&gt;

&lt;p&gt;Not knowing anything about the class except what you've told me, I agree. File a bug report.

</field>
<field name="root_node">
814129</field>
<field name="parent_node">
814134</field>
</data>
</node>
