string test and encoding