<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.gitignore</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -6,10 +6,12 @@ $KCODE='u'
 module Tranexp; end
 
 begin
-  require 'mechanize'
+  require 'rubygems'
   require &quot;active_support&quot;
+  $:.unshift &quot;/Users/nicwilliams/gems/mechanize/lib&quot;
+  require 'mechanize'
 rescue LoadError
-  require 'rubygems'
+  # require 'rubygems'
   gem 'mechanize', '&gt;=0.7.5'
   require 'mechanize'
 end</diff>
      <filename>lib/tranexp.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,7 +13,7 @@ class Tranexp::Http
       &quot;Submit.y&quot; =&gt; 9,
       :translation =&gt; &quot;&quot;
     })
-    page.forms[1]['translation']
+    clean_up page.forms[1]['translation']
   end
 
   # Support calls like #from_nor_to_eng, or #from_eng_to_
@@ -24,5 +24,21 @@ class Tranexp::Http
     end
     super
   end
+
+  protected
+  def clean_up dirty_text
+    newstr = &quot;&quot;
+    dirty_text.length.times do |i|
+      character = dirty_text[i]
+      newstr += if character &lt; 0x80
+        character.chr
+      elsif character &lt; 0xC0
+        &quot;\xC2&quot; + character.chr
+      else
+        &quot;\xC3&quot; + (character - 64).chr
+      end
+    end
+    newstr
+  end
 end
 </diff>
      <filename>lib/tranexp/http.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,11 +2,11 @@ require File.dirname(__FILE__) + '/test_helper.rb'
 
 class TestTranexpHttp &lt; Test::Unit::TestCase
   attr_reader :translate
-  
+
   def setup
     @translate = Tranexp::Http.new
   end
-  
+
   def test_english_to_norwegian
     if_connected do
       assert_nothing_thrown do
@@ -15,14 +15,12 @@ class TestTranexpHttp &lt; Test::Unit::TestCase
       end
     end
   end
-  
+
   def test_utf8
     if_connected do
       assert_nothing_thrown do
         english = translate.translate(&quot;i would like to learn Norwegian&quot;, Tranexp::Http::English, Tranexp::Http::Norwegian)
-        require 'iconv'
-        # actual = Iconv.new('utf-16', 'utf-8').iconv(english)
-        assert_equal(&quot;jeg ville like &#229; h&#248;re Norsk.&quot;, english)
+        assert_equal(&quot;jeg ville like &#229; h&#248;re Norsk&quot;, english)
       end
     end
   end</diff>
      <filename>test/test_tranexp_http.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a56a81452d816ca8e1e18e44f519beddebef612b</id>
    </parent>
  </parents>
  <author>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </author>
  <url>http://github.com/drnic/tranexp/commit/f1ea314846e408c67576393ba4f55bf30c791695</url>
  <id>f1ea314846e408c67576393ba4f55bf30c791695</id>
  <committed-date>2008-04-16T04:41:00-07:00</committed-date>
  <authored-date>2008-04-16T04:41:00-07:00</authored-date>
  <message>Fixed unicode issues; cp1252-&gt;utf-8 conversion included</message>
  <tree>84b59776c739ec90f8024593518227a3fd748dcd</tree>
  <committer>
    <name>Dr Nic Williams</name>
    <email>drnicwilliams@gmail.com</email>
  </committer>
</commit>
