# replace module cannot crashes when encountering Danish characters

**URL:** <https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912>\
**Category:** Ansible Project\
**Created:** [March 19, 2019, 5:03pm UTC](https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912 "2019-03-19T17:03:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark.tovey](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mark.tovey](https://forum.ansible.com/u/mark.tovey)\
**Post date:** [March 19, 2019, 5:03pm UTC](https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912/1 "2019-03-19T17:03:26Z")

</div>

I am working on a playbook to replace the comment field in a server’s password file. I was trying to use the replace module to do this. But it began crashing on one server. By elimination I was able to isolate the problem to one user’s account entry in the password file. The user is Danish and his name contains the minuscule character (small o with a slash through it, hexadecimal f8). If I replace that character with the ‘o’ character, the replace module works fine, but if I put the minuscule charter back, it crashes. Interestingly, the lineinfile module does not have this problem, only the replace module is affected.  
The company I work for is based in Copenhagen, so this is going to be an ongoing issue and I don’t think I am going to be able to convince everyone to spell their names differently, so the module needs to be repaired. What is the best way to submit a bug? The version of Ansible we are currently using is 2.7.5.  
-Mark

---

<div class="post-metadata">

**Author:** ![Amit\_Bhardwaj](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@Amit\_Bhardwaj](https://forum.ansible.com/u/Amit_Bhardwaj)\
**Post date:** [March 19, 2019, 5:08pm UTC](https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912/2 "2019-03-19T17:08:03Z")

</div>

I think [https://github.com/ansible/ansible/issues](https://github.com/ansible/ansible/issues) is your best bet.

Regards  
AB

---

<div class="post-metadata">

**Author:** ![mark.tovey](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mark.tovey](https://forum.ansible.com/u/mark.tovey)\
**Post date:** [March 19, 2019, 5:47pm UTC](https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912/3 "2019-03-19T17:47:36Z")

</div>

Thanks!

> **(attachments)**
>
> ![image001.gif](https://us1.discourse-cdn.com/ansible/original/2X/b/b4bff17d9a47b579955542df88244e4ed45d94f4.gif)  
> ![image002.png](https://us1.discourse-cdn.com/ansible/original/2X/5/5b66cf09fa8b8d9e8a019dc18020d43a5cca4b68.png)

---

<div class="post-metadata">

**Author:** ![S\_C\_Rigler](https://avatars.discourse-cdn.com/v4/letter/s/eb9ed0/32.png) [@S\_C\_Rigler](https://forum.ansible.com/u/S_C_Rigler)\
**Post date:** [March 19, 2019, 6:19pm UTC](https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912/4 "2019-03-19T18:19:27Z")

</div>

Assuming you're talking about the local /etc/passwd file, the user  
module can handle the gecos field.

--Steve

---

<div class="post-metadata">

**Author:** ![mark.tovey](https://avatars.discourse-cdn.com/v4/letter/m/ce73a5/32.png) [@mark.tovey](https://forum.ansible.com/u/mark.tovey)\
**Post date:** [March 19, 2019, 6:29pm UTC](https://forum.ansible.com/t/replace-module-cannot-crashes-when-encountering-danish-characters/29912/5 "2019-03-19T18:29:14Z")

</div>

A very good point. I was looking at it as a file of strings that needed to be modified. It didn't occur to me to look at the purpose of the file and any modules written directly for the file.  
&nbsp;&nbsp;&nbsp;&nbsp;Thanks!  
&nbsp;&nbsp;&nbsp;&nbsp;-Mark
