# Spanish Characters

**URL:** <https://discourse.slicer.org/t/spanish-characters/10333>\
**Category:** Support\
**Created:** [February 18, 2020, 1:42pm UTC](https://discourse.slicer.org/t/spanish-characters/10333 "2020-02-18T13:42:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pablo\_de\_Arriba](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pablo_de_arriba/32/5023_2.png) [@Pablo\_de\_Arriba](https://discourse.slicer.org/u/Pablo_de_Arriba)\
**Post date:** [February 18, 2020, 1:42pm UTC](https://discourse.slicer.org/t/spanish-characters/10333/1 "2020-02-18T13:42:53Z")

</div>

In the beginning of the code write (in the first line):

# -_- coding: 850 -_-

Then, you can use the characters as follows (unicode):

\xe1 = á  
\xe9 = é  
\xed = í  
\xf3 = ó  
\xfa = ú  
\xc1 = Á  
\xc9 = É  
\xcd = Í  
\xd3 = Ó  
\xda = Ú  
\xf1 = ñ  
\xd1 = Ñ  
\xbf = ¿  
\xa1 = ¡

---

<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:** [February 18, 2020, 2:05pm UTC](https://discourse.slicer.org/t/spanish-characters/10333/2 "2020-02-18T14:05:48Z")

</div>

Thanks for the information. Note that code pages are legacy technology. While code pages might still work in certain circumstances, nowadays UTF-8 is the universal standard on all modern editors and most other software, too.

In Slicer we switch to “UTF-8 everywhere” in about a week - see [https://github.com/Slicer/Slicer/pull/1319](https://github.com/Slicer/Slicer/pull/1319).

---

<div class="post-metadata">

**Author:** ![timeanddoctor](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/timeanddoctor/32/5839_2.png) [@timeanddoctor](https://discourse.slicer.org/u/timeanddoctor)\
**Post date:** [February 19, 2020, 1:21pm UTC](https://discourse.slicer.org/t/spanish-characters/10333/3 "2020-02-19T13:21:13Z")

</div>

This means that we can translate to Chinese more easy(such as in the Gui of a module)?

---

<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:** [February 20, 2020, 3:45am UTC](https://discourse.slicer.org/t/spanish-characters/10333/4 "2020-02-20T03:45:41Z")

</div>

This UTF-8 development will allow usage of special characters in file names, node names, and in general, any strings that the user enters or loads from files.

You can already translate most of the GUI, but there are a few things to do:

- use `tr` macro in all translatable text in the Slicer source code (should not be too much work) translation macros can find them
- develop translation mechanism for CLI modules and Python scripted modules
- update string definition in Python scripted modules to use the new mechanism (or .ui files)
- re-enable language selection on GUI (was available at some point but disabled now)
