title: ISO-8859-15 encoding with nodejs
body: <p>We are experiencing a very anoying encoding problem which started with loopback but seems to be nodejs related.
  Basically, we just finished developping an API with Loopback based upon an existing SQL_ASCII encoded postgresql database. Since the API has to be in UTF-8, we try to convert the data sent through our API routes to ISO-8859-15 in order to insert them correctly in our base.
  No matter what iconv, utf8, iso-8859 etc. modules we tried, we couldn't get to pass ISO-8859-15 converted strings, we ended up with very strange stuff. For example :</p>
  
  <pre><code>var Iconv  = require('iconv').Iconv; 
  var iconv = new Iconv('UTF-8','ISO-8859-1'); 
  var label = iconv.convert("bébé").toString();
  </code></pre>
  
  <p>If we insert then the "label" into our database, we end up with someting like that = <strong>"bï¿½bï¿½"</strong> !</p>
  
  <p>So we just tried to look directly in the Terminal how it behaved with a basic nodejs application (without loopback or any other framework) but it didn't turn out to be better.
  Once the Terminal encoding set up to "ISO Latin 1", the following code :</p>
  
  <pre><code>console.log('bébé');
  </code></pre>
  
  <p>Was displayed this way in the Terminal :</p>
  
  <pre><code>bÃ©bÃ©
  </code></pre>
  
  <p>As if nodejs was completely unable to handle ISO-8859 strings.
  Are we missing something there ?
  Are we doomed to use UTF-8 string in order to make this work ?</p>