fix C++/Java build regressions, added WString::setDefaultEncoding()
minified that