# Problem with special characters like Spanish accents

**URL:** <https://forum.wixstudio.com/t/problem-with-special-characters-like-spanish-accents/39845>\
**Category:** Ask the community\
**Tags:** question, code, wix-stores\
**Created:** [June 1, 2018, 12:03am UTC](https://forum.wixstudio.com/t/problem-with-special-characters-like-spanish-accents/39845 "2018-06-01T00:03:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gurcita22](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/gurcita22/32/4430_2.png) [@gurcita22](https://forum.wixstudio.com/u/gurcita22)\
**Post date:** [June 1, 2018, 12:03am UTC](https://forum.wixstudio.com/t/problem-with-special-characters-like-spanish-accents/39845/1 "2018-06-01T00:03:47Z")

</div>

Hi Wix Community!

I applied a code to a paragraph in order to make it collapse and expand on the site. It works very well but now I have a problem with the text. The paragraph is in Spanish and, as soon as I apply the code, the special characters like words with accents don’t read well.

For example: Instead of showing “Política” it displays “Política”.

Everything looks fine in the editor but gets bad when i got to preview or published mode. Any suggestions?

Thank you so much!

* * *

This is my code:

**let** fullText1; // variable to hold the full text  
**let** shortText1; // variable to hold the short version of the text

$w.onReady( **function** () {  
// how many characters to include in the shortened version  
**const** shortText1Length = 500;  
// read the full text and store it in the fullText variable  
fullText1 = $w(“#mytext”).text;  
// // grab the number of characters defined in shortTextLength and store them in the shortText variable  
shortText1 = fullText1.substr(0, shortText1Length) + “…”;  
// set the contents of the text element to be the short text  
$w(“#mytext”).text = shortText1;

});

export function EPPEsm\_click(event, $w) {  
// if currently displaying short text, display the full text  
**if** ($w(“#mytext”).text === shortText1) {  
$w(“#mytext”).text = fullText1;  
$w(“#mybutton”).label = “Show less”;  
} **else** {  
// if currently displaying full text, display the short text  
$w(“#mytext”).text = shortText1;  
$w(“#mybutton”).label = “Show more”;  
}  
}

---

<div class="post-metadata">

**Author:** ![\_tal](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/_tal/32/669_2.png) [@\_tal](https://forum.wixstudio.com/u/_tal)\
**Post date:** [June 4, 2018, 9:40am UTC](https://forum.wixstudio.com/t/problem-with-special-characters-like-spanish-accents/39845/2 "2018-06-04T09:40:50Z")

</div>

Hi,  
Can you please send us the site URL and a screenshot of the issue so that we can have a look?

Thanks,  
Tal.

---

<div class="post-metadata">

**Author:** ![ibandurevskaya](https://avatars.discourse-cdn.com/v4/letter/i/c0e974/32.png) [@ibandurevskaya](https://forum.wixstudio.com/u/ibandurevskaya)\
**Post date:** [August 8, 2018, 1:03pm UTC](https://forum.wixstudio.com/t/problem-with-special-characters-like-spanish-accents/39845/3 "2018-08-08T13:03:54Z")

</div>

Hi, i have the same issue. Did you find a solution?

---

<div class="post-metadata">

**Author:** ![olesiaz](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/olesiaz/32/1054_2.png) [@olesiaz](https://forum.wixstudio.com/u/olesiaz)\
**Post date:** [August 19, 2018, 5:24am UTC](https://forum.wixstudio.com/t/problem-with-special-characters-like-spanish-accents/39845/4 "2018-08-19T05:24:39Z")

</div>

This issue has already been reported to QA and will hopefully be resolved soon.
