Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
utf-8 charset fix in admin pages
#1
Hi,

I recommend to add:

header('content-type: text/html; charset=utf-8');

in the first line of admin/template/header.php to avoid seeing invalid utf-8 characters in administration pages.

Some servers sends a default iso-8859-1 charset in the header and browsers ignores the meta tags of the page.

Regards,
Mauro.
Reply
#2
Browsers are not supposed to ignore the meta charset.

Actually you are right http header is prioritized. I have actually been meaning to check up on this, I had a similar issue on a test server.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
Hi,

I have a huge problem with entities. I am french (please forgive my very bad english), so i use a lot of entities like (é,è,à, and so on), and i have special characters in my pages.
Two months ago i have no problem, everything was fine, entities were normal, but now, even if i didn't change anything, i have this problem.

I tried this solution :
PHP Code:
define('GSEDITOROPTIONS',"
    entities : false
    "
); 
but nothing happened. I read a lot of topics here but i found only old (and already corrected) solutions.

In the Edit Page of CKEditor i can change entities but when i save, special characters come back, in the result page and in the editor. Even in this forum i cannot see entities normally whereas my browser is using UTF-8.

I need help please.Sad
Reply
#4
Hi,

I found the real problem... In fact my editor doesn't save text modifications. The only solution i found is to disable html editor in Settings and write html.
Reply
#5
(2013-09-27, 16:57:48)blopez Wrote: I found the real problem... In fact my editor doesn't save text modifications. The only solution i found is to disable html editor in Settings and write html.

Can you explain some more, please? I don't have any problem with using utf8 characters on any of my GetSimple installations. I can write text in the editor window directly from the keyboard, including accents, and everything is saved and displayed correctly. The problems that you have are not normal.

Just to be clear, an html entity looks like this:
Code:
è
which is the entity for è, a utf8 character.

In gsconfig.php, I have entities : false. If I look at the Source view in CKEditor, I only see the utf8 characters.

Other things to check:
- in the Admin interface: Support -> Website Health Check;
- if you enable debug mode (gsconfig.php, uncomment define('GSDEBUG', TRUE);), do you have any errors when you use the editor and save page changes?
- any errors in the server logs?
- where is your site hosted?
- what is your computer operating system and version? Which browser and version?
--
Nick.
Reply
#6
I'm PhD in a laboratory and the site is hosted by a server in the lab. My OS is OSX 10.8.5 and my browser Chrome (last version).
If i enable the Editor and type something like "é" in it, when i save my "é" becomes "é". The only solution i found, like i said just before is to disable the editor and write "é".
But now, the changes are saved.

In gsconfig i also have entities :false but nothing changed.
Website Health check is all ok but "cURL Module" and "ZipArchive" that are not installed.
Debug mode doesn't change anything.
Reply
#7
I wonder if your server is sending the wrong content-type headers.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#8
(2013-09-28, 00:13:09)blopez Wrote: My OS is OSX 10.8.5 and my browser Chrome (last version).

What is the locale set in OS X? (Use the command locale in a terminal.) For French/France it should be "fr_FR.UTF-8" (but provided it has UTF-8 at the end, it should be okay).

In Chrome, check that the character encoding is set for UTF8. This Google support page shows how, if you don't know.

By the way, do pages on your site look correct or are they showing strange characters, too?
--
Nick.
Reply




Users browsing this thread: 3 Guest(s)