title: how to set UTF8 lang on Tomcat/java running on Mac OS 10.5.8?
body: <p>I'm running Tomcat6 locally on Mac OS 10.5.8. Our staging and production servers have setup an environment variable of:</p>
  
  <pre><code>LANG=en_US.UTF-8
  </code></pre>
  
  <p>Stage and production run on CentOS and read this value in when java and Tomcat starts up. However, it doesn't appear that java is reading this value and is defaulting to en_US_ISO_85591. On my local machine, I have added LANG=en_US.UTF-8 to my .bash_profile file, because java &amp; Tomcat are running as my user.</p>
  
  <p>If it helps, the situation we're running into is that we have a backend service that delivers xml-formatted UTF8 data to another controller that converts the data into a page-level variable. Its during the conversion process locally that the XML data is being converted to the ISO_85591 format, then back to UTF-8, and it breaks with this error:</p>
  
  <pre><code>Invalid byte 1 of 1-byte UTF-8 sequence.
  </code></pre>
  
  <p>Is there another way to configure this?</p>