GetmeUK / ContentTools

A JS library for building WYSIWYG editors for HTML content.
http://getcontenttools.com
MIT License
3.95k stars 395 forks source link

Broken characters when it's in spanish #459

Closed igdamico closed 6 years ago

igdamico commented 6 years ago

Every character that has an accent on load are broken.

Example: original: ECONOMÍA on edition mode: ECONOMÍA.

í = Í á = á ñ= ñ

*Original text are in spanish

anthonyjb commented 6 years ago

@igdamico I'm not able to repeat this issue using the editor, are you able to repeat it on the demo page: http://getcontenttools.com/demo?

To test I basically inserted the 'ECONOMÍA' content into the page (using the inspector) then clicked the edit button - all worked as expected. This looks like an encoding issue but without more detail or access to an example it's difficult to pinpoint - though at this point I don't think it's an issue related to CT (happy to be proved wrong though).

anthonyjb commented 6 years ago

I've also just tested in a live site that I can edit content with the characters you've mentioned and I don't see the same issue.

igdamico commented 6 years ago

Hi anthonyjb, thanks for the very fast answer.

in demo works but it's not the same because i just had text with accents in my "data-editable" div before using the editor.

igdamico commented 6 years ago

this is my html that works perfect without the editor. https://jsfiddle.net/0bac3nfb/

igdamico commented 6 years ago

don't worry! i add in the header

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

and now it's working!

thanks fo the advice!