tidying up the unicode checks, but there may still be a problem in the cxx

Signed-off-by: buckie <wjmartino@gmail.com>