You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using aws cli v2.27.22 under Windows 10 "cmd" and am facing encoding issues when I export and import QuickSight dashboard definitions with it.
Here is the command I use to export:
With this, I get a json file encoded as CP1252 which is not what I want as everything I deal with is UTF-8. Now, looking at this issue comment, I made sure to call set PYTHONUTF8=1 before running that command and it then gives me a UTF-8 encoded file.
This, in itself is a mild annoyance but it can be worked around.
However, when I want to create a dashboard using the CLI and giving all the arguments in a UTF-8 encoded file via cli-input-json, it tries to encode the content into UTF-8 a second time, effectively destroying the content. Here is a command that I use:
Using the same environment variable as above does not change the situation at all, nor using PYTHONIOENCODING=UTF-8, and I could not find any way to tell the CLI to simply never try to UTF-8 encode the input file contents.
Running the same commands under WSL2 makes all encoding issues disappear, but it's not always a possible solution, nor is changing the entire operating system parameters. That last one is especially problematic where company wide policies prevent access to those options.
When reading from the console input, I can understand the need to encode special characters, but there is no need to do so when reading the entire arguments from an external file, especially when it is a requirement that it is UTF-8 encoded.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm using aws cli v2.27.22 under Windows 10 "cmd" and am facing encoding issues when I export and import QuickSight dashboard definitions with it.
Here is the command I use to export:
With this, I get a json file encoded as CP1252 which is not what I want as everything I deal with is UTF-8. Now, looking at this issue comment, I made sure to call
set PYTHONUTF8=1
before running that command and it then gives me a UTF-8 encoded file.This, in itself is a mild annoyance but it can be worked around.
However, when I want to create a dashboard using the CLI and giving all the arguments in a UTF-8 encoded file via
cli-input-json
, it tries to encode the content into UTF-8 a second time, effectively destroying the content. Here is a command that I use:Using the same environment variable as above does not change the situation at all, nor using
PYTHONIOENCODING=UTF-8
, and I could not find any way to tell the CLI to simply never try to UTF-8 encode the input file contents.Running the same commands under WSL2 makes all encoding issues disappear, but it's not always a possible solution, nor is changing the entire operating system parameters. That last one is especially problematic where company wide policies prevent access to those options.
When reading from the console input, I can understand the need to encode special characters, but there is no need to do so when reading the entire arguments from an external file, especially when it is a requirement that it is UTF-8 encoded.
What else can I try?
Beta Was this translation helpful? Give feedback.
All reactions