Fixed bug and support for UCS-2LE encoding.

Windows sometime uses UCS-2LE encoding.