<?xml version="1.0" encoding="windows-1252"?>
<node id="995475" title="Re: utf8 problems with Pod-ProjectDocs" created="2012-09-24 21:24:18" updated="2012-09-24 21:24:18">
<type id="11">
note</type>
<author id="879250">
remiah</author>
<data>
<field name="doctext">
&lt;p&gt;
I couldn't fully trace this, nor understand all. If you are going to have some trial, 4 lines of dirty patch to ProjectDocs::Parse.pm seems to me work.&lt;br&gt;&lt;br&gt;

1. decode $self-&gt;{buffer} to character. Add 2 lines
&lt;code&gt;
use Encode qw/decode/;
$self-&gt;{buffer}=decode('UTF-8', $self-&gt;{buffer});
&lt;/code&gt;
just after the line
&lt;code&gt;  
$self-&gt;{buffer} = join "\n", qq[&lt;div class="pod"&gt;], $self-&gt;{buffer}, "&lt;/div&gt;";
&lt;/code&gt;
,which is in the "end_pos" sub. &lt;br&gt;&lt;br&gt;

2. encode $self-&gt;{buffer} back. Add 2 lines
&lt;code&gt;
use Encode(qw/encode/);
$self-&gt;{buffer}=encode('UTF-8', $self-&gt;{buffer});
&lt;/code&gt;
just after
&lt;code&gt;
$self-&gt;SUPER::parse_from_file(@_);
&lt;/code&gt;
,which is in "parse_from_file" sub.&lt;br&gt;&lt;br&gt;

before SUPER::parse_from_file, it has no troble. after SUPER::parse_from_file, it is troubled. "end_pos" is callback from Pod::Parser.
&lt;/p&gt;

</field>
<field name="root_node">
995425</field>
<field name="parent_node">
995425</field>
</data>
</node>
