title: How to get utf-8 from forms in Bottle?
body: <p>I am trying to use Bottle.py to get input information from users in a web page.</p>
  
  <p>Everything works fine except when I have latin characters (accents mostly). I have try using utf-8 and latin-1 coding on the first two lines of the code, but it won't work.</p>
  
  <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*-
  import bottle
  
  @bottle.post('/newpost')
  def post_newpost():
      subject = bottle.request.forms.get("subject")
      body = bottle.request.forms.get("body")
      tags = bottle.request.forms.get("tags")
  </code></pre>
  
  <p>and the html code from the page is:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8" /&gt;
  &lt;title&gt;New Posts&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form action="/newpost" method="POST"&gt;
  
  &lt;h2&gt;Post title&lt;/h2&gt;
  &lt;input type="text" name="subject" size="120" value="{{subject}}" &gt;&lt;br&gt;
  &lt;h2&gt;Post&lt;h2&gt;
  &lt;textarea name="body" cols="120" rows="20"&gt;{{body}}&lt;/textarea&gt;&lt;br&gt;
  &lt;h2&gt;Tags&lt;/h2&gt;
  &lt;input type="text" name="tags" size="120" value="{{tags}}"&gt;&lt;br&gt;
  &lt;p&gt;
  &lt;input type="submit" value="Submit"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I read in Bottle page that:</p>
  
  <ul>
  <li><p>In Python 3 all strings are unicode, but HTTP is a byte-based wire
  protocol. The server has to decode the byte strings somehow before
  they are passed to the application. To be on the safe side, WSGI
  suggests ISO-8859-1 (aka latin1), a reversible single-byte codec that
  can be re-encoded with a different encoding later. Bottle does that
  for FormsDict.getunicode() and attribute access, but not for the
  dict-access methods. These return the unchanged values as provided by
  the server implementation, which is probably not what you want.</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>request.query['city']</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>'GÃ¶ttingen' # An utf8 string provisionally decoded as ISO-8859-1 by the server</p>
  
  <blockquote>
    <blockquote>
      <blockquote>
        <p>request.query.city</p>
      </blockquote>
    </blockquote>
  </blockquote>
  
  <p>'Göttingen'  # The same string correctly re-encoded as utf8 by bottle</p></li>
  </ul>
  
  <p>If you need the whole dictionary with correctly decoded values (e.g. for WTForms), you can call FormsDict.decode() to get a re-encoded copy.</p>
  
  <p>After reading that I tried using that function but don't know how. 
  Right now Bottle form returns strings, so I can not use encode('utf-8') or decode('utf-8'). </p>
  
  <p>Please help me!</p>
  
  <p>Thanks!</p>