Fix localeEncoding.
Merge pull request #237 from minoki/master

Fix localeEncoding() in lib/rts.js