title: How to create SSL certificate with Unicode characters in the Organization name (or other fields)?
body: <p>I've created a self-signed SSL certificate and have no trouble using it, but the browser (Firefox, Chrome/IE) shows garbled characters in the Organization's name (anything above ASCII has 2 characters).</p>
  
  <p>I created the certificate in a Debian running on virtualbox (Win host), the shell's locales are all *.UTF-8, and I used CA.pl for this. I can create files with Unicode characters and have no other issues, but the cert has "OrganizauÃ§Ã£o" instead of "Organização".</p>
  
  <p>Any tips? Escaping the characters (how)? Dumbing down the locale to  ISO/IEC 8859-1? Using some non-shell method? Am i missing something obvious?</p>
  
  <p>On a side note, is there an easy way (i.e. 4ummies™) to distribute the certificate, so a user can just click and install? All the guides i've seen involve too many windows for a regular user to bother with; and without installing it the browser will yelp every time the user visits (except Firefox which allows an easy installation via the warning box).</p>
  
  <p><strong>Edit 1</strong></p>
  
  <p>Checking the asn1parse manpage and using its example:</p>
  
  <pre><code>openssl asn1parse -genstr 'UTF8:Organização'
  </code></pre>
  
  <p>produces:</p>
  
  <pre><code>0:d=0  hl=2 l=  17 prim: UTF8STRING        :OrganizaÃ§Ã£o
  </code></pre>
  
  <p>So i assume it's a problem with the input. This is my locale information:</p>
  
  <pre><code>LANG=pt_PT.utf8
  LANGUAGE=en_US:en
  All LC_* fields="pt_PT.utf8"
  LC_ALL=
  </code></pre>
  
  <p>I have no problems touching Organização or any other files with nonASCII characters, yet my CA cert gets dumbed down to 8bits.</p>
  
  <p><strong>Edit 2</strong></p>
  
  <p>I've started with <a href="https://www.debian-administration.org/article/618/Certificate_Authority_CA_with_OpenSSL" rel="noreferrer">this</a> tutorial, but went on to reading the OpenSSL man. In reading the <code>req</code> man i came across <a href="https://www.openssl.org/docs/apps/req.html#BUGS" rel="noreferrer">this</a> in the bugs section: <em>As a consequence of the T61String handling the only correct way to represent accented characters in OpenSSL is to use a BMPString</em></p>
  
  <p>So i tried with:</p>
  
  <pre><code>openssl asn1parse -genstr 'BMP:Organização'
  </code></pre>
  
  <p>and end up with an empty string:</p>
  
  <pre><code>0:d=0  hl=2 l=  26 prim: BMPSTRING
  </code></pre>