Added Unicode support (with mxArrayToString function) and simplified string handling