Fixed encoding issues

With a wrong locale, UI scripts with non-ascii chars would break xibless.
v0.5.1