Added test case for encode control characters.