title: How do I properly store and retrieve internationalized Strings in properties files?
body: <p>I'm experimenting with internationalization by making a Hello World program that uses properties files + ResourceBundle to get different strings.</p>
  
  <p>Specifically, I have a file "messages_en_US.properties" that stores "hello.world=Hello World!", which works fine of course.</p>
  
  <p>I then have a file "messages_ja_JP.properties" which I've tried all sorts of things with, but it always appears as some type of garbled string when printed to the console or in Swing. The problem is obviously with the reading of the content into a Java string, as a Java string in Japanese typed directly into the source can print fine.</p>
  
  <p>Things I've tried:</p>
  
  <ul>
  <li>The .properties file in UTF-8 encoding with the Japanese string as-is for the value. Something I read indicates that Java expects a properties file to be in the native encoding of the system...? It didn't work either way.</li>
  <li>The file in default encoding (ISO-8859-1) and the value stored as escaped Unicode created by the native2ascii program included with Java. Tried with a source file in various Japanese encodings... SHIFT-JIS, EUC-JP, ISO-2022-JP.</li>
  </ul>
  
  <p><strong>Edit:</strong></p>
  
  <p>I actually figured this out while I was typing this, but I figured I'd post it anyway and answer it in case it helps anyone.</p>