string encoding checks that string is safe