Adds tests for Str and fixes missing encoding varable