# Slicer ignoring command line path with accents

**URL:** <https://discourse.slicer.org/t/slicer-ignoring-command-line-path-with-accents/24569>\
**Category:** Support\
**Created:** [July 29, 2022, 7:03pm UTC](https://discourse.slicer.org/t/slicer-ignoring-command-line-path-with-accents/24569 "2022-07-29T19:03:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ale](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/ale/32/67086_2.png) [@Ale](https://discourse.slicer.org/u/Ale)\
**Post date:** [July 29, 2022, 7:03pm UTC](https://discourse.slicer.org/t/slicer-ignoring-command-line-path-with-accents/24569/1 "2022-07-29T19:03:48Z")

</div>

Hi all, I’m getting this error when trying to load a file in command line:

> Slicer /home/mark/Docs/GMM\_Cráneos\_Armadillos/Models/cvi\_24.ply

Then, the error below shows strange characters where the “á” was in the path.

> Ignore argument received via command-line (not a valid URL or existing local file): "/home/mark/Docs/GMM\_CrÃ¡neos\_Armadillos/Models/cvi\_24.ply

My locale output is:

LANG=es\_AR.UTF-8  
LANGUAGE=es:en\_US  
LC\_CTYPE=“es\_AR.UTF-8”  
LC\_NUMERIC=es\_AR.UTF-8  
LC\_TIME=es\_AR.UTF-8  
LC\_COLLATE=“es\_AR.UTF-8”  
LC\_MONETARY=es\_AR.UTF-8  
LC\_MESSAGES=“es\_AR.UTF-8”  
LC\_PAPER=es\_AR.UTF-8  
LC\_NAME=es\_AR.UTF-8  
LC\_ADDRESS=es\_AR.UTF-8  
LC\_TELEPHONE=es\_AR.UTF-8  
LC\_MEASUREMENT=es\_AR.UTF-8  
LC\_IDENTIFICATION=es\_AR.UTF-8  
LC\_ALL=

System KDE Neon 5.25 (Ubuntu Focal)

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [July 29, 2022, 10:33pm UTC](https://discourse.slicer.org/t/slicer-ignoring-command-line-path-with-accents/24569/2 "2022-07-29T22:33:05Z")

</div>

I was able to reproduce this:

```auto
perklab@perklabseg:~/Slicer/Slicer-5.0.2-linux-amd64$ ./Slicer --testing --python-code "print('GMM_Cráneos_Armadillo\n')"
Switch to module: "Welcome"
GMM_CrÃ¡neos_Armadill
Switch to module: ""
Switch to module: ""

```

I’ve tried the same command with bypassing the launcher (started `bash` with the launcher and then started SlicerApp-real from there) and it worked well:

```auto
perklab@perklabseg:~/Slicer/Slicer-5.0.2-linux-amd64$ ./Slicer --launch bash
perklab@perklabseg:~/Slicer/Slicer-5.0.2-linux-amd64$ ./bin/SlicerApp-real --testing --python-code "print('GMM_Cráneos_Armadillo\n')"
Switch to module: "Welcome"
GMM_Cráneos_Armadillo
Switch to module: ""
Switch to module: ""

```

I’ve had a look at the code and found the root cause of the problem. The launcher does not use UTF8 everywhere, but there are [toLatin1](https://github.com/commontk/AppLauncher/search?q=tolatin1) calls in it. We should replace those by `toLocal8bit` or `toUtf8`. I’ve submitted a pull request with this change:

> <https://github.com/commontk/AppLauncher/pull/127>
>
> Should fix the issues described here: https://discourse.slicer.org/t/slicer-igno…ring-command-line-path-with-accents/24569

---

<div class="post-metadata">

**Author:** ![jcfr](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jcfr/32/17825_2.png) [@jcfr](https://discourse.slicer.org/u/jcfr)\
**Post date:** [August 8, 2025, 6:17pm UTC](https://discourse.slicer.org/t/slicer-ignoring-command-line-path-with-accents/24569/3 "2025-08-08T18:17:10Z")

</div>

To follow-up, corresponding fixes have been integrated.

See [PR-8629 (Slicer/Slicer)](https://github.com/Slicer/Slicer/pull/8629) and [PR-127 (commontk/AppLauncher)](https://github.com/commontk/AppLauncher/pull/127) for more details.

Thanks @lassoan for contributing the fix 💯 & everyone for the patience 🙏
