title: MySQL command line formatting with UTF8
body: <p>I have a database table that contains Swedish/Norwegian strings.</p>
  
  <p>When I query some data, I get output like this:</p>
  
  <h2>Output with <code>set names latin1;</code></h2>
  
  <pre><code>+-----------------------------------+
  | name                              |
  +-----------------------------------+
  | Kid Interi#####                   | 
  | Bwg Homes                         | 
  | If Skadef####kring                | 
  | Jangaard Export                   | 
  | Nordisk Film                      | 
  +-----------------------------------+
  </code></pre>
  
  <p>Now if I <code>set names utf8;</code> in order to see the characters with their proper encoding, then the formatting of the tabular output of the MySQL command line breaks.</p>
  
  <h2>Output with <code>set names utf8;</code></h2>
  
  <pre><code>+-----------------------------------+
  | name                              |
  +-----------------------------------+
  | Kid Interiør                     | 
  | Bwg Homes                         | 
  | If Skadeförsäkring              | 
  | Jangaard Export                   | 
  | Nordisk Film                      | 
  +-----------------------------------+
  </code></pre>
  
  <h2>Question:</h2>
  
  <p>This is not a big issue but it makes the output a bit harder to read. Does anybody know how to keep the tabular formatting intact?</p>