aws/aws-cli — pull request #1049 by jamesls (2014-12-08 21:38:05+00:00)
Title: Don't print unicode escape sequences for non-ascii chars

Also, we need to use the get_stdout_text_writer because of a
bug in py2.6 in which the `.encoding` attribute is not honored
for `sys.stdout` (http://bugs.python.org/issue4947).

Fixes #1048.

Also manually verified on py2.6:

```
$ aws --version
aws-cli/1.6.6 Python/2.6.8 Darwin/13.4.0
$ aws dynamodb scan --table-name testtable2 --output json
{
"Count": 1,
"Items": [
{
"foo": {
"S": "✓"
}
}
],
"ScannedCount": 1,
"ConsumedCapacity": null
}

$ aws dynamodb scan --table-name testtable2 --output text
FOO	✓

$ aws dynamodb scan --table-name testtable2 --output table
-----------------------------------------------
| Scan |
+-------------------+--------+----------------+
| ConsumedCapacity | Count | ScannedCount |
+-------------------+--------+----------------+
| None | 1 | 1 |
+-------------------+--------+----------------+
|| Items ||
||| foo |||
||+-------------------+---------------------+||
||| S | ✓ |||
||+-------------------+---------------------+||

```

cc @kyleknap @danielgtaylor