Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Locale should be set on st2-docker environment #129

Closed
jbrownsc opened this issue May 10, 2018 · 0 comments
Closed

Locale should be set on st2-docker environment #129

jbrownsc opened this issue May 10, 2018 · 0 comments

Comments

@jbrownsc
Copy link

jbrownsc commented May 10, 2018

Description
Some Stack Storm commands use the system locale to encode values printed to the screen (st2 run --tail for example). The LC_ALL environment variable can be set to whatever locale the system supports and Stack Storm will honor that encoding.

See StackStorm/st2#4120 (comment) for more information

Steps to reproduce
Good:

root@c3c4ea471142:/opt/stackstorm# LC_ALL=en_US.utf-8 st2 run --tail core.local cmd="printf '\xE2\x98\xA0'"
Tailing execution "5af482e73ce5fe4ce3623747"
Execution 5af482e73ce5fe4ce3623747 has started.

☠
Execution 5af482e73ce5fe4ce3623747 has completed (status=succeeded).

id: 5af482e73ce5fe4ce3623747
status: succeeded
parameters:
  cmd: printf '�'
result:
  failed: false
  return_code: 0
  stderr: ''
  stdout: "☠"
  succeeded: true

Bad:

root@c3c4ea471142:/opt/stackstorm# st2 run --tail core.local cmd="printf '\xE2\x98\xA0'"
Tailing execution "5af483d93ce5fe4ce362374a"
Execution 5af483d93ce5fe4ce362374a has started.

ERROR: 'ascii' codec can't encode character u'\u2620' in position 0: ordinal not in range(128)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant