Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (19.1k points)

I'm using AWS CLI on Windows to query items from DynamoDb. Some of these items include non-ASCII characters.

When the query hits those items, it dies with an error

'charmap' codec can't encode character u'u010d' in position....

After hours of searching, I finally stumbled across a hackish workaround; under the AWSCLI\encodings directory, I copied utf_8.pyc over cp1252.pyc. This allows me to continue, but of course, is ugly.

Before resorting to that, I also tried setting environment variables such as LANG, LC_ALL, LC_CTYPE to various permutations of en-US.UTF-8 or similar, all with no effect that I could see.

Does anyone know how (or is it even possible) to tell AWS CLI to use a particular encoding?

1 Answer

0 votes
by (44.4k points)
edited by

Since you're using the command-line interface, a change to the terminal's encoding scheme should fix the issue.

Type:

chcp 65001

in the console (for UTF-8; you may also try different encodings) and retry your operations.

Also for more insights about S3 and other AWS skills, visit the AWS Course page.

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
asked Mar 31, 2021 in Java by dante07 (13.1k points)

Browse Categories

...