<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: UTF-8 A-Go-Go</title>
	<atom:link href="http://dysphoria.net/2006/02/05/utf-8-a-go-go/feed/" rel="self" type="application/rss+xml" />
	<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/</link>
	<description>For long lost friends and stalkers</description>
	<lastBuildDate>Sat, 22 May 2010 15:01:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Oleg Kuznetsov</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-33944</link>
		<dc:creator>Oleg Kuznetsov</dc:creator>
		<pubDate>Mon, 28 Dec 2009 01:25:53 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-33944</guid>
		<description>DBD::mysql v4.011 supports {mysql_enable_utf8 =&gt; 1} key, but it does not setup utf8 flag, unfortunately =(

perl 5.10
dbi 1.609</description>
		<content:encoded><![CDATA[<p>DBD::mysql v4.011 supports {mysql_enable_utf8 =&gt; 1} key, but it does not setup utf8 flag, unfortunately =(</p>
<p>perl 5.10<br />
dbi 1.609</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-25350</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 21 Jan 2009 22:02:35 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-25350</guid>
		<description>Thanks Allan. It was certainly written as a band-aid, not a proper fix… it’s nice that people can start to take the band-aid off. Though it’s certainly taken a while for the wound underneath to heal.

(This painfully extended metaphor is brought to you by CPAN and Johnson &amp; Johnson.)</description>
		<content:encoded><![CDATA[<p>Thanks Allan. It was certainly written as a band-aid, not a proper fix… it’s nice that people can start to take the band-aid off. Though it’s certainly taken a while for the wound underneath to heal.</p>
<p>(This painfully extended metaphor is brought to you by CPAN and Johnson &#038; Johnson.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Allan Engelhardt</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-25336</link>
		<dc:creator>Allan Engelhardt</dc:creator>
		<pubDate>Wed, 21 Jan 2009 12:16:03 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-25336</guid>
		<description>For some database drivers the UTF8DBI modules is not longer needed:

DBD::Pg (PostgreSQL) : Use { pg_enable_utf8 =&gt; 1 } in the attributes to DBI-&gt;connect (e.g. my $dbh=DBI-&gt;connect($dsn, $user, $pass, { AutoCommit =&gt; 1, RaiseError =&gt; 0, pg_enable_utf8 =&gt; 1 };)  [Tested.]

DBD::mysql (MySQL) : Similarly, use { mysql_enable_utf8 =&gt; 1 }.  [Not tested and marked &quot;experimental&quot; at http://search.cpan.org/~capttofu/DBD-mysql-4.010/lib/DBD/mysql.pm#mysql_enable_utf8 so try to see if it works for you]

DBD::SQLite (SQLite) : Setting &quot;$dbh-&gt;{unicode} = 1&quot; will turn on the utf8 flag on all strings.  [Not tested, see http://search.cpan.org/~msergeant/DBD-SQLite-1.14/lib/DBD/SQLite.pm#unicode]

Hope this note will help others....</description>
		<content:encoded><![CDATA[<p>For some database drivers the UTF8DBI modules is not longer needed:</p>
<p>DBD::Pg (PostgreSQL) : Use { pg_enable_utf8 =&gt; 1 } in the attributes to DBI-&gt;connect (e.g. my $dbh=DBI-&gt;connect($dsn, $user, $pass, { AutoCommit =&gt; 1, RaiseError =&gt; 0, pg_enable_utf8 =&gt; 1 };)  [Tested.]</p>
<p>DBD::mysql (MySQL) : Similarly, use { mysql_enable_utf8 =&gt; 1 }.  [Not tested and marked "experimental" at <a href="http://search.cpan.org/~capttofu/DBD-mysql-4.010/lib/DBD/mysql.pm#mysql_enable_utf8" rel="nofollow">http://search.cpan.org/~capttofu/DBD-mysql-4.010/lib/DBD/mysql.pm#mysql_enable_utf8</a> so try to see if it works for you]</p>
<p>DBD::SQLite (SQLite) : Setting &#8220;$dbh-&gt;{unicode} = 1&#8243; will turn on the utf8 flag on all strings.  [Not tested, see <a href="http://search.cpan.org/~msergeant/DBD-SQLite-1.14/lib/DBD/SQLite.pm#unicode" rel="nofollow">http://search.cpan.org/~msergeant/DBD-SQLite-1.14/lib/DBD/SQLite.pm#unicode</a></p>
<p>Hope this note will help others&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-3287</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sun, 07 Jan 2007 14:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-3287</guid>
		<description>Yup.

I’ve applied Andrew Scheller’s two fixes to UTF8CGI. Not quite sure how I’d missed them.

I’ve also changed UTF8DBI for Pavel Kudinov’s version, but for a couple of changes:
* Removed the prototype on the &lt;code&gt;_utf8_&lt;/code&gt; function.
* Added back in the check for duff UTF8. Belt and braces.
* Removed all but one of the &lt;code&gt;fetch…&lt;/code&gt; functions, since, it seems, all of the other statement-handle fetch functions go through that one.
* Now that should be all that’s required, in theory, since, as Pavel says, the &lt;code&gt;DBI::db&lt;/code&gt; &lt;code&gt;select…&lt;/code&gt; functions should just be short ways of getting at the &lt;code&gt;st&lt;/code&gt; functions, but that doesn’t seem to be the case. It wouldn’t work without me reimplementing the &lt;code&gt;select…&lt;/code&gt; functions too. (At least, this is the case in my version of the DBI module, which, as you can imagine, is the one that I care about.)

Have fun,

–A</description>
		<content:encoded><![CDATA[<p>Yup.</p>
<p>I’ve applied Andrew Scheller’s two fixes to UTF8CGI. Not quite sure how I’d missed them.</p>
<p>I’ve also changed UTF8DBI for Pavel Kudinov’s version, but for a couple of changes:<br />
* Removed the prototype on the <code>_utf8_</code> function.<br />
* Added back in the check for duff UTF8. Belt and braces.<br />
* Removed all but one of the <code>fetch…</code> functions, since, it seems, all of the other statement-handle fetch functions go through that one.<br />
* Now that should be all that’s required, in theory, since, as Pavel says, the <code>DBI::db</code> <code>select…</code> functions should just be short ways of getting at the <code>st</code> functions, but that doesn’t seem to be the case. It wouldn’t work without me reimplementing the <code>select…</code> functions too. (At least, this is the case in my version of the DBI module, which, as you can imagine, is the one that I care about.)</p>
<p>Have fun,</p>
<p>–A</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-2255</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Wed, 30 Aug 2006 22:54:18 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-2255</guid>
		<description>I’m afraid I’m a mere weekend (well, and evenings) Perl programmer. I need all the help I can get, so usually switch on strictness, warnings, and taint mode, too, if the situation seems to benefit from it.</description>
		<content:encoded><![CDATA[<p>I’m afraid I’m a mere weekend (well, and evenings) Perl programmer. I need all the help I can get, so usually switch on strictness, warnings, and taint mode, too, if the situation seems to benefit from it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pavel Kudinov</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-2182</link>
		<dc:creator>Pavel Kudinov</dc:creator>
		<pubDate>Thu, 24 Aug 2006 16:46:05 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-2182</guid>
		<description>Andrew, i just prefer &quot;no warnings&quot;, but &quot;use strict&quot;. i&#039;m just think that perl warnings concept wrong for pretty code writing style.</description>
		<content:encoded><![CDATA[<p>Andrew, i just prefer &#8220;no warnings&#8221;, but &#8220;use strict&#8221;. i&#8217;m just think that perl warnings concept wrong for pretty code writing style.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Scheller</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-1352</link>
		<dc:creator>Andrew Scheller</dc:creator>
		<pubDate>Tue, 27 Jun 2006 10:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-1352</guid>
		<description>Another update for you :-)
perl -wc UTF8DBI.pm complains with:
UTF8DBI::st::_utf8_() called too early to check prototype at UTF8DBI.pm line 10.

UTF8DBI::st::_utf8_() called too early to check prototype at UTF8DBI.pm line 11.

Apparently (according to google ;) ) the fix is to either forward-declare the _utf8_ sub, or to not use prototypes. I chose the former option (because I&#039;m not familiar with prototypes) and managed to get rid of the warning by inserting:
sub _utf8_();
on the line before the &quot;real&quot; sub.</description>
		<content:encoded><![CDATA[<p>Another update for you :-)<br />
perl -wc UTF8DBI.pm complains with:<br />
UTF8DBI::st::_utf8_() called too early to check prototype at UTF8DBI.pm line 10.</p>
<p>UTF8DBI::st::_utf8_() called too early to check prototype at UTF8DBI.pm line 11.</p>
<p>Apparently (according to google ;) ) the fix is to either forward-declare the _utf8_ sub, or to not use prototypes. I chose the former option (because I&#8217;m not familiar with prototypes) and managed to get rid of the warning by inserting:<br />
sub _utf8_();<br />
on the line before the &#8220;real&#8221; sub.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-1098</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Tue, 06 Jun 2006 11:18:39 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-1098</guid>
		<description>Thanks for all the feedback.

I haven&#039;t been ignoring you, I&#039;ve just been really busy. I plan to update my code with Pavel and Andrew S&#039;s comments in a couple of weeks (as soon as this show is out of the way).

Best regards,

--A</description>
		<content:encoded><![CDATA[<p>Thanks for all the feedback.</p>
<p>I haven&#8217;t been ignoring you, I&#8217;ve just been really busy. I plan to update my code with Pavel and Andrew S&#8217;s comments in a couple of weeks (as soon as this show is out of the way).</p>
<p>Best regards,</p>
<p>&#8211;A</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Scheller</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-1082</link>
		<dc:creator>Andrew Scheller</dc:creator>
		<pubDate>Mon, 05 Jun 2006 16:46:48 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-1082</guid>
		<description>One more addendum - bet you can&#039;t guess what I&#039;ve spent all day doing! ;)

I think you need to add:
next if $query-&gt;upload($key);
after line 50 of UTF8CGI.pm  &quot;foreach my $key ($query-&gt;param) {&quot;
Otherwise the filehandle (when grabbed with a later query-&gt;upload) seems to be invalid...?</description>
		<content:encoded><![CDATA[<p>One more addendum &#8211; bet you can&#8217;t guess what I&#8217;ve spent all day doing! ;)</p>
<p>I think you need to add:<br />
next if $query-&gt;upload($key);<br />
after line 50 of UTF8CGI.pm  &#8220;foreach my $key ($query-&gt;param) {&#8221;<br />
Otherwise the filehandle (when grabbed with a later query-&gt;upload) seems to be invalid&#8230;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew Scheller</title>
		<link>http://dysphoria.net/2006/02/05/utf-8-a-go-go/comment-page-1/#comment-1081</link>
		<dc:creator>Andrew Scheller</dc:creator>
		<pubDate>Mon, 05 Jun 2006 13:35:25 +0000</pubDate>
		<guid isPermaLink="false">http://dysphoria.net/?p=51#comment-1081</guid>
		<description>Ooops, spoke too soon... ;)
After doing some proper testing, I believe I&#039;ve got a bugfix for UTF8CGI.pm :-
For ActivePerl 5.8.8 on Windows 2003 (dunno about other versions/platforms) I needed to change line 53 from:
foreach my $val ($query-&gt;param($key)) {
to instead say:
foreach my $val (@{$query-&gt;param_fetch($key)}) {
otherwise the param values remain unchanged after the loop.

I also think it&#039;s safe to get rid of &quot;use utf8;&quot; as the only non-ASCII characters are the sloped-apostrophes within comments on lines 49 and 51.</description>
		<content:encoded><![CDATA[<p>Ooops, spoke too soon&#8230; ;)<br />
After doing some proper testing, I believe I&#8217;ve got a bugfix for UTF8CGI.pm :-<br />
For ActivePerl 5.8.8 on Windows 2003 (dunno about other versions/platforms) I needed to change line 53 from:<br />
foreach my $val ($query-&gt;param($key)) {<br />
to instead say:<br />
foreach my $val (@{$query-&gt;param_fetch($key)}) {<br />
otherwise the param values remain unchanged after the loop.</p>
<p>I also think it&#8217;s safe to get rid of &#8220;use utf8;&#8221; as the only non-ASCII characters are the sloped-apostrophes within comments on lines 49 and 51.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

