<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.cybaea.net/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><title>CYBAEA Technology Notes</title><rights>Copyright by the author(s). All rights reserved.</rights><logo>http://static.cybaea.net/logo2011/cybaea-technotes-200.png</logo><subtitle type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>The blog to satisfy your inner geek!  Our Technology Notes is an infrequent series of notes that document some of our learnings from experimenting with various tools and gadgets.</p><p>This blog is for technology enthusiasts only.</p></div></subtitle><updated>2010-12-30T00:00:00Z</updated><id>urn:uuid:fd52d62d-4791-5912-9eab-c37d58c31ff9</id><link rel="alternate" type="application/xhtml+xml" href="http://www.cybaea.net/Blogs/TechNotes/" /><link rel="alternate" type="text/html" href="http://www.cybaea.net/Blogs/TechNotes/" /><author><name>Allan Engelhardt</name><uri>http://www.cybaea.net/</uri></author><generator uri="http://www.cybaea.net/atom/feed.pl?short_name=TechNotes" version="$Revision: 97 $">feed.pl</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.cybaea.net/CybaeaTechNotes" /><feedburner:info uri="cybaeatechnotes" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>CybaeaTechNotes</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><entry><title type="text">4 easy steps to make Mason utf-8 Unicode clean with Apache, mod_perl, and DBI</title><id>urn:uuid:68141ef5-51ac-518b-b969-b6d11ccdd855</id><link rel="alternate" type="application/xhtml+xml" href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html" /><link rel="alternate" type="text/html" href="http://feeds.cybaea.net/~r/CybaeaTechNotes/~3/GZS20fhZW7U/Mason-utf-8-clean.html" /><summary type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><div class="floatRight">
<a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html"><img src="http://static.cybaea.net/images/powered-by-mason-trans.png" width="88" height="31" alt="[Mason logo]" title="Click on the Mason logo for the full article" /></a>
</div>
<p>
This is a note for people who are using the <a href="http://www.masonhq.com/">Mason</a> system for high-performance, dynamic web site authoring with <a href="http://httpd.apache.org/">Apache</a>, <a href="http://perl.apache.org/">mod_perl</a>, and a relational database like <a href="http://www.postgresql.org/">PostgreSQL</a> accessed through DBI, and who want to be utf-8 Unicode clean in all their data.
</p>
<p>
You want to be able to write accented letters in any language in your web pages.  You want your users to be able to enter any characters in web forms, and you want that data to get in and out of your relational database and still display correctly and be handled correctly by perl.
</p>
<p>
That is, unfortunately, not how it works out of the box, at least not on Red Hat Enterprise Linux 5 or on Fedora 10.  This article shows how we made it work right.
</p></div></summary><content type="html">&lt;div xmlns="http://www.w3.org/1999/xhtml"&gt;&lt;p&gt;&#xD;
This is a note for people who are using the &lt;a href="http://www.masonhq.com/"&gt;Mason&lt;/a&gt; system for high-performance, dynamic web site authoring with &lt;a href="http://httpd.apache.org/"&gt;Apache&lt;/a&gt;, &lt;a href="http://perl.apache.org/"&gt;mod_perl&lt;/a&gt;, and a relational database like &lt;a href="http://www.postgresql.org/"&gt;PostgreSQL&lt;/a&gt; accessed through DBI, and who want to be utf-8 Unicode clean in all their data.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
You want to be able to write accented letters in any language in your web pages.  You want your users to be able to enter any characters in web forms, and you want that data to get in and out of your relational database and still display correctly and be handled correctly by perl.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
That is, unfortunately, not how it works out of the box, at least not on Red Hat Enterprise Linux 5 or on Fedora 10.  This article shows how we made it work right.&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h1&gt;Our objective&lt;/h1&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
Our objective is to use utf-8 encoded strings everywhere.  We are not concerned with other character encodings.  This may not exactly match your requirements so consider your own situation before copying our setup.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
We want to store text in the database in utf-8, we want to display our web pages as utf-8, and we want all form input to be utf-8 clean.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
We want this to work on our Fedora 10 development machines and our RHEL 5 production servers.  Our Mason configuration in Apache is fairly standard and along the lines of:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;&amp;lt;LocationMatch "(\.html|\.pl)$"&amp;gt;&#xD;
  SetHandler modperl&#xD;
  PerlResponseHandler HTML::Mason::ApacheHandler&#xD;
&amp;lt;/LocationMatch&amp;gt;&#xD;
&amp;lt;Perl&amp;gt;&#xD;
  use Apache2::Const -compile =&amp;gt; qw(NOT_FOUND);&#xD;
&amp;lt;/Perl&amp;gt;&#xD;
&amp;lt;LocationMatch "(\.m(html|txt|pl|css)|dhandler|autohandler)$"&amp;gt;&#xD;
  SetHandler perl-script&#xD;
  PerlInitHandler Apache2::Const::NOT_FOUND&#xD;
&amp;lt;/LocationMatch&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;h1&gt;Our Solution&lt;/h1&gt;&#xD;
&#xD;
&lt;h2 id="h2_summary"&gt;Summary for the impatient&lt;/h2&gt;&#xD;
&#xD;
&lt;p&gt;This is the quick summary for the impatient.  If something doesn't make sense, then see below for the details.&lt;/p&gt;&#xD;
&#xD;
&lt;ol&gt;&#xD;
&lt;li&gt;Make sure you send the right HTTP, XML, and HTML information:&#xD;
&lt;ol&gt;&#xD;
&lt;li&gt;Make sure you send &lt;code&gt;charset=utf-8&lt;/code&gt; in your HTTP &lt;code&gt;Content-Type&lt;/code&gt; header.  (&lt;a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html#h3_http"&gt;More&lt;/a&gt;)&lt;/li&gt;&#xD;
&lt;li&gt;Make sure you have &lt;code&gt;encoding="utf-8"&lt;/code&gt; in any &lt;code&gt;&amp;lt;?xml ?&amp;gt;&lt;/code&gt; preambles (if you use application/xhtml+xml or any other XML content type). (&lt;a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html#h3_html"&gt;More&lt;/a&gt;)&lt;/li&gt;&#xD;
&lt;li&gt;For good measure, add &lt;code&gt;charset=utf-8&lt;/code&gt; to a &lt;code&gt;&amp;lt;meta http-equiv="Content-Type" ... &amp;gt;&lt;/code&gt; line in your HTML &lt;code&gt;HEAD&lt;/code&gt; section. (As above)&lt;/li&gt;&#xD;
&lt;/ol&gt;&#xD;
&lt;/li&gt;&#xD;
&lt;li&gt;Add &lt;code&gt;PerlSetVar MasonPreamble "use utf8;"&lt;/code&gt; to your Apache configuration file to make your Mason source files utf-8 safe. (&lt;a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html#h2_mason_input"&gt;More&lt;/a&gt;)&lt;/li&gt;&#xD;
&lt;li&gt;Add &lt;code&gt;PerlAddVar MasonPlugins "&lt;a href="http://static.cybaea.net/code/MasonX-Plugin-UTF8/"&gt;MasonX::Plugin::UTF8&lt;/a&gt;"&lt;/code&gt; to your Apache configuration file to make your forms utf-8 safe. (&lt;a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html#h2_form_input"&gt;More&lt;/a&gt;)&lt;/li&gt;&#xD;
&lt;li&gt;Add &lt;code&gt;{ pg_enable_utf8 =&amp;gt; 1 }&lt;/code&gt; (or &lt;code&gt;mysql_enable_utf8=&amp;gt;1&lt;/code&gt;, &lt;code&gt;unicode=&amp;gt;1&lt;/code&gt;, or similar depending on your RDBMS) to your &lt;code&gt;DBI-&amp;gt;connect&lt;/code&gt; call to make your database utf-8 safe. (&lt;a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html#h2_database"&gt;More&lt;/a&gt;)&lt;/li&gt;&#xD;
&lt;/ol&gt;&#xD;
&#xD;
&lt;h2 id="h2_1"&gt;1. Send the web pages with the right character set&lt;/h2&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
You are probably doing this already, but it is better to be safe.  You have to send the right &lt;code&gt;charset&lt;/code&gt; in the HTTP headers and the HTML &lt;code&gt;head&lt;/code&gt; sections.  If you are using xhtml or another XML format, then you also need the right &lt;code&gt;encoding&lt;/code&gt; attribute on your &lt;code&gt;&amp;lt;?xml ?&amp;gt;&lt;/code&gt; tag.&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h3 id="h3_http"&gt;HTTP headers&lt;/h3&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
The HTTP headers first.  Somewhere in your setup, probably in code called from your Mason &lt;code&gt;autohandler&lt;/code&gt;, you are presumably already sending the &lt;code&gt;Content-Type:&lt;/code&gt; header.  You need to ensure that you have &lt;code&gt;charset=utf-8&lt;/code&gt; at the end of that.  For example:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;&amp;lt;%init&amp;gt;&#xD;
# ...&#xD;
$r-&amp;gt;&lt;a href="http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_content_type_"&gt;content_type&lt;/a&gt;(q{text/html; charset=utf-8})&#xD;
# ...&#xD;
&amp;lt;/%init&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
Our full code allows us to override the default content type and character encoding in individual sections:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;&amp;lt;%init&amp;gt;&#xD;
my $self         = $m-&amp;gt;request_comp();&#xD;
my $encoding     = $self-&amp;gt;attr('encoding') || "utf-8";&#xD;
my $content_type = $self-&amp;gt;attr('content_type');&#xD;
if ( !defined($content_type) ) {&#xD;
  $content_type = "text/html";                          # Fallback type&#xD;
  my $accept_header = $r-&amp;gt;headers_in-&amp;gt;{'Accept'} || q{application/xhtml+xml};&#xD;
  my $a = &lt;a href="https://www.cybaea.net/svn/repos/HTTP-Headers-Accept/"&gt;HTTP::Headers::Accept&lt;/a&gt;-&amp;gt;new(header =&amp;gt; $accept_header);&#xD;
  if ( $HTTP::Headers::Accept::double_wildcard &amp;lt; $a-&amp;gt;match_media(q{application/xhtml+xml}) ) {&#xD;
      $content_type = "application/xhtml+xml";&#xD;
  }&#xD;
}&#xD;
$r-&amp;gt;content_type(qq{$content_type; charset=$encoding});&#xD;
# ...&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
Alternatively, you may be able to simply add to your Apache configuration file:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;   &lt;a href="http://httpd.apache.org/docs/2.2/mod/core.html#adddefaultcharset"&gt;AddDefaultCharset&lt;/a&gt; utf-8 &#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
However, this only works for &lt;code&gt;text/plain&lt;/code&gt; and &lt;code&gt;text/html&lt;/code&gt; content and you lose some flexibility.&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h3 id="h3_html"&gt;XML and HTML headers&lt;/h3&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
Next, if you are sending your pages as any XML format you need to ensure that your XML preable has the right &lt;code&gt;encoding&lt;/code&gt; parameter:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
And whatever you do, you probably want to copy your &lt;code&gt;$r-&amp;gt;content_type&lt;/code&gt; value as a &lt;code&gt;META&lt;/code&gt; tag in the HTML HEAD section:&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;pre class="code"&gt;&amp;lt;head&amp;gt;&#xD;
 &amp;lt;meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /&amp;gt;&#xD;
 &amp;lt;!-- ... --&amp;gt;&#xD;
&amp;lt;/head&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;h2 id="h2_mason_input"&gt;2. Fix Mason source files&lt;/h2&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
Now you &lt;em&gt;should&lt;/em&gt; be all done, but, alas, your problems are just starting.  I assume that you have some sort of &lt;code&gt;autohandler&lt;/code&gt; that manages your site's templates and you can just create a new file, say &lt;code&gt;test.html&lt;/code&gt; with the content&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="document"&gt;&amp;lt;p&amp;gt;Copyright © by me&amp;lt;/p&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
When I do that on my system and display the page in Firefox (or another recent browser) I see&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="document"&gt;Copyright Â© by me&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;Eeeek!&lt;/p&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
The problem is good old perl.  And I mean old as in ancient, pre Unicode.  Perl doesn't do Unicode very well, or at least not very intuitively.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
When you are using Mason your &lt;code&gt;.html&lt;/code&gt; files are no longer just HTML.  Instead they are really perl code snippets that Mason magically runs for you.  And, by default, perl source code is not utf-8 safe!  (This is true at least up to perl v.5.10 and probably will remain true until perl v6.)  You need to add the magic incantation &lt;code&gt;use utf8;&lt;/code&gt; before you can use utf8 characters in your perl source code strings (which, remember, is what your &lt;code&gt;.html&lt;/code&gt; file really is).  So try changing &lt;code&gt;text.html&lt;/code&gt; to:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="document"&gt;&amp;lt;p&amp;gt;Copyright © by me&amp;lt;/p&amp;gt;&#xD;
&amp;lt;%once&amp;gt;&#xD;
use utf8;&#xD;
&amp;lt;/%once&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
And you will see it works.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
This would obviously be a pain to do (and remember to do) in ever file.  Fortunately, you can simply add to your Apache configuration file&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;  PerlSetVar MasonPreamble "use utf8;"&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
And all your source files are utf-8 safe.  Cool!&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h2 id="h2_form_input"&gt;3. Fix form inputs&lt;/h2&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
I am assuming that all your HTML forms are already looking a little like this:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;&amp;lt;form action="#" method="post" accept-charset="UTF-8" enctype="multipart/form-data"&amp;gt;&#xD;
&amp;lt;!-- ... --&amp;gt;&#xD;
&amp;lt;/form&amp;gt;&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
You obviously want to tell the client (browser) that you accept utf-8 strings, and since there is currently no safe standard way of URL encode Unicode characters, you are left with POST methods and the multipart/form-data encoding.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
And it &lt;em&gt;should&lt;/em&gt; all work out of the box.  But it doesn't.  Make a form and add our favourite test string “Copyright © by me” to it and preview the result.  Our friend the ‘Â’ is back.  Sigh.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
So we create a plugin module called &lt;a href="http://static.cybaea.net/code/MasonX-Plugin-UTF8/"&gt;MasonX::Plugin::UTF8&lt;/a&gt; essentially as:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;package MasonX::Plugin::UTF8;&#xD;
use base qw(HTML::Mason::Plugin);&#xD;
use warnings;&#xD;
use strict;&#xD;
sub start_request_hook {&#xD;
    my ( $self, $context ) = @_;&#xD;
    my $args_ref = $context-&amp;gt;args();&#xD;
    foreach my $arg ( @{$args_ref} ) {&#xD;
        utf8::is_utf8($arg) || utf8::decode($arg);&#xD;
    }&#xD;
    return;&#xD;
}&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
And we add it to our Apache configuration with&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;&amp;lt;Perl&amp;gt;&#xD;
  use lib '/some/path';&#xD;
&amp;lt;/Perl&amp;gt;&#xD;
PerlAddVar MasonPlugins "&lt;a href="http://static.cybaea.net/code/MasonX-Plugin-UTF8/"&gt;MasonX::Plugin::UTF8&lt;/a&gt;"&#xD;
&lt;/pre&gt;&#xD;
&lt;p&gt;&#xD;
And it just works.  As it should have done out of the box.&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h2 id="h2_database"&gt;4. Fix your database&lt;/h2&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
So now you save your form data in your relational database system, get it back out, display it and find your old friend ‘Â’ is back.  Sigh.  Did I mention that perl is old?&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
I am assuming that you are using the DBI module to access the database.  This is currently not utf-8 clean by default because most of the underlying drivers are not utf-8 clean by default.  (And that is for “backwards compatibility”.)&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
The fix depends on your database driver, but many of them have a magic attribute you can pass to the &lt;code&gt;DBI-&amp;gt;connect&lt;/code&gt; call to make them utf-8 safe.  Some of them are listed below:&#xD;
&lt;/p&gt;&#xD;
&lt;table class="border"&gt;&#xD;
&lt;thead&gt;&#xD;
&lt;tr&gt;&lt;th&gt;Driver&lt;/th&gt;&lt;th&gt;Database&lt;/th&gt;&lt;th&gt;Utf-8 attribute&lt;/th&gt;&lt;/tr&gt;&#xD;
&lt;/thead&gt;&#xD;
&lt;tbody&gt;&#xD;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://search.cpan.org/dist/DBD-Pg/Pg.pm"&gt;DBD::Pg&lt;/a&gt;&lt;/td&gt;&lt;td&gt;PostgreSQL&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;a href="http://search.cpan.org/dist/DBD-Pg/Pg.pm#pg_enable_utf8_(boolean)"&gt;pg_enable_utf8&lt;/a&gt; =&amp;gt; 1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm"&gt;DBD::mysql&lt;/a&gt;&lt;/td&gt;&lt;td&gt;MySQL&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;a href="http://search.cpan.org/dist/DBD-mysql/lib/DBD/mysql.pm#mysql_enable_utf8"&gt;mysql_enable_utf8&lt;/a&gt; =&amp;gt; 1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;tr&gt;&lt;td&gt;&lt;a href="http://search.cpan.org/dist/DBD-SQLite/lib/DBD/SQLite.pm"&gt;DBD::SQLite&lt;/a&gt;&lt;/td&gt;&lt;td&gt;SQLite&lt;/td&gt;&lt;td&gt;&lt;code&gt;&lt;a href="http://search.cpan.org/dist/DBD-SQLite/lib/DBD/SQLite.pm#Unicode_handling"&gt;sqlite_unicode&lt;/a&gt; =&amp;gt; 1&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&#xD;
&lt;/tbody&gt;&#xD;
&lt;/table&gt;&#xD;
&lt;p&gt;&#xD;
(Warning: The MySQL option is currently “experimental and may change in future versions” and SQLite requires special handling of blobs with the unicode flag enabled.)&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
So for PostgreSQL you would do something like:&#xD;
&lt;/p&gt;&#xD;
&lt;pre class="code"&gt;my $dbh = DBI-&amp;gt;connect( $dsn, $user, $pass, &#xD;
                        { AutoCommit =&amp;gt; 1, RaiseError =&amp;gt; 0, pg_enable_utf8 =&amp;gt; 1 } );&#xD;
&lt;/pre&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
This of course assumes that you have created the database as a utf-8 database in the first instance!  Sticking with PostgreSQL as the example, you would have done &lt;code&gt;createdb -E utf8 ...&lt;/code&gt; from the command line or used the SQL command&lt;code&gt;CREATE DATABASE ... ENCODING 'UTF8';&lt;/code&gt;.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;&#xD;
If your database driver does not support utf-8 directly, you might want to consider the &lt;a href="http://dysphoria.net/2006/02/05/utf-8-a-go-go/"&gt;UTF8DBI&lt;/a&gt; module as a workaround.&#xD;
&lt;/p&gt;&#xD;
&#xD;
&lt;h1&gt;Done!&lt;/h1&gt;&#xD;
&#xD;
&lt;p&gt;&#xD;
And now you are done!  Enjoy and let me know of your experiences.&#xD;
&lt;/p&gt;&#xD;
&lt;p&gt;Jump to &lt;a href="http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html#h2_entry_comments"&gt;comments&lt;/a&gt;.&lt;/p&gt;&#xD;
&lt;div class="seealso"&gt;&#xD;
&lt;h1&gt;You may also like these posts:&lt;/h1&gt;&#xD;
&lt;ol&gt;&#xD;
&lt;li&gt;&#xD;
&lt;p&gt;&#xD;
&lt;img src="http://static.cybaea.net/logo2011/cybaea-rate-40.png" width="85" height="16" alt="[0.44]" title="[0.44]"&gt;&lt;/img&gt;&#xD;
&lt;a href="http://www.cybaea.net/Blogs/Data/SNA-with-R-Loading-large-networks-using-the-igraph-library.html" title="We are interested in Social Network Analysis using the statistical analysis and computing platform R . The documentation for R is voluminous but typically not very good, so this entry is part of a series where we document what we learn as we explore the tool and the packages. In our previous post on SNA we gave up on using the statnet package because it was not able to handle our data volumes. In this entry we have better success with the igraph package."&gt;SNA with R: Loading large networks using the igraph library&lt;/a&gt;&#xD;
&lt;/p&gt;&#xD;
&lt;p class="summary"&gt;We are interested in Social Network Analysis using the statistical analysis and computing platform R . The documentation for R is voluminous but typically not very good, so this entry is part of a series where we document what we learn as we explore the tool and the packages. In our previous post on SNA we gave up on using the statnet package because it was not able to handle our data volumes. In this entry we have better success with the igraph package.&lt;/p&gt;&#xD;
&lt;/li&gt;&#xD;
&lt;/ol&gt;&#xD;
&lt;/div&gt;&#xD;
&#xD;
&lt;/div&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.cybaea.net/~ff/CybaeaTechNotes?a=GZS20fhZW7U:33P4lWeIsrY:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CybaeaTechNotes?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.cybaea.net/~ff/CybaeaTechNotes?a=GZS20fhZW7U:33P4lWeIsrY:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CybaeaTechNotes?i=GZS20fhZW7U:33P4lWeIsrY:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.cybaea.net/~ff/CybaeaTechNotes?a=GZS20fhZW7U:33P4lWeIsrY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CybaeaTechNotes?i=GZS20fhZW7U:33P4lWeIsrY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.cybaea.net/~ff/CybaeaTechNotes?a=GZS20fhZW7U:33P4lWeIsrY:qj6IDK7rITs"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CybaeaTechNotes?d=qj6IDK7rITs" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.cybaea.net/~ff/CybaeaTechNotes?a=GZS20fhZW7U:33P4lWeIsrY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CybaeaTechNotes?i=GZS20fhZW7U:33P4lWeIsrY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.cybaea.net/~ff/CybaeaTechNotes?a=GZS20fhZW7U:33P4lWeIsrY:TzevzKxY174"&gt;&lt;img src="http://feeds.feedburner.com/~ff/CybaeaTechNotes?d=TzevzKxY174" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CybaeaTechNotes/~4/GZS20fhZW7U" height="1" width="1"/&gt;</content><published>2009-01-28T17:57:00Z</published><updated>2010-12-30T00:00:00Z</updated><author><name>Allan Engelhardt</name><uri>http://www.cybaea.net/</uri></author><feedburner:origLink>http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html</feedburner:origLink></entry></feed>

