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

Problems displaying German umlauts #33127

Closed
Nothingtoloose opened this issue Nov 21, 2017 · 5 comments · Fixed by #37229
Closed

Problems displaying German umlauts #33127

Nothingtoloose opened this issue Nov 21, 2017 · 5 comments · Fixed by #37229
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community

Comments

@Nothingtoloose
Copy link

ISSUE TYPE
  • Bug Report
COMPONENT NAME

win_shell

ANSIBLE VERSION
ansible 2.4.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/hubot/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

CONFIGURATION

I made no changes.

OS / ENVIRONMENT

Source: Ubuntu 16.04 LTS
Target: Windows 10 64Bit

SUMMARY

The function "win_shell" displays German umlauts incorrectly.
Example:

Status   Name               DisplayName                           
------           ----               -----------                           
Running  wlidsvc            Anmelde-Assistent f�r Microsoft-Konten

STEPS TO REPRODUCE
  1. Run the following code on the console
ansible windows -m win_shell -a "powershell Get-Service -Name wlidsvc"
EXPECTED RESULTS

Ansible should display German umlauts like "ü""ä".

Status   Name               DisplayName                           
------           ----               -----------                           
Running  wlidsvc            Anmelde-Assistent für Microsoft-Konten

ACTUAL RESULTS

Ansible cannot display German umlauts.

Status   Name               DisplayName                           
------           ----               -----------                           
Running  wlidsvc            Anmelde-Assistent f�r Microsoft-Konten

@ansibot
Copy link
Contributor

ansibot commented Nov 21, 2017

Files identified in the description:

If these files are inaccurate, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Nov 21, 2017

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 bug_report module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community labels Nov 21, 2017
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Nov 21, 2017
@dagwieers
Copy link
Contributor

I agree, the resulting output should be Unicode.

If I run this playbook:

- hosts: computers
  tasks:
  - win_shell: Write-Host "éèüö€"

I get this output:

[dag@moria crombeen]$ ansible-playbook test2.yml -l computer27 -v
Using /home/dag/home-made/crombeen/ansible.cfg as config file

PLAY [computers] ****************************************************************

TASK [win_shell] ****************************************************************
changed: [computer27] => {"changed": true, "cmd": "Write-Host \"éèüö€\"", "delta": "0:00:01.244067", "end": "2017-11-23 10:17:45.210095", "rc": 0, "start": "2017-11-23 10:17:43.966028", "stderr": "", "stderr_lines": [], "stdout": "����?\n", "stdout_lines": ["����?"]}

PLAY RECAP **********************************************************************
computer27                 : ok=1    changed=1    unreachable=0    failed=0   

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 1, 2018
@jborean93
Copy link
Contributor

@Nothingtoloose @dagwieers this was a puzzling one to try and track down as Windows does not make this easy. I was able to figure out the reason why this occurs and have created a PR to fix this in the various instances that it would be affected. If you are able to test it out that would be great #37229

@dagwieers
Copy link
Contributor

dagwieers commented Mar 21, 2018

It now works fine with #37229

[dag@moria crombeen]$ ansible-playbook test2.yml -l computer91 -v
Using /home/dag/home-made/crombeen/ansible.cfg as config file

PLAY [computers] *********************************************************************************************

TASK [win_shell] *********************************************************************************************
changed: [computer91] => {"changed": true, "cmd": "Write-Host \"éèüö€\"", "delta": "0:00:00.468763", "end": "2018-03-21 11:57:02.115029", "rc": 0, "start": "2018-03-21 11:57:01.646266", "stderr": "", "stderr_lines": [], "stdout": "éèüö€\n", "stdout_lines": ["éèüö€"]}

PLAY RECAP ***************************************************************************************************
computer91                 : ok=1    changed=1    unreachable=0    failed=0   

@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.4 This issue/PR affects Ansible v2.4 bug This issue/PR relates to a bug. module This issue/PR relates to a module. support:core This issue/PR relates to code supported by the Ansible Engineering Team. windows Windows community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants