a class and utilities to deal with native string encoding per OS