Hi guys,
I've searched the boards a bit, without luck - i hope you can help me.
I'm loading in a HTML-page with simple english first:
My cat is called "ninja". It's green.
The '-symbol and "-symbol gets replaced by a weird �-symbol.
The same with the danish letters: ÆØÅ.
It's a bit weird tho, due to it's being perfectly shown, when opened in a webbrowser.
The way im getting the HTML, inside the FCKeditor:
$oFCKeditor->Value = file_get_contents($_GET["doc"]);
edit.php?doc=whatever.html
I'm not a shark at php, but i'm learning, so be gentle .
Edit:
I dunno if it's to some help, but i did some testing. Made a test.php, with the:
echo file_get_contents($_GET["doc"]);
No problems there... showed perfectly in the browser.
Mon, 11/17/2008 - 17:01
#1
Re: Foreign symbols, and letters
Its because you have not set up your page using the correct hearder fields try putting in something like
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-gb" xml:lang="en-gb">
at the top of your HTML
Re: Foreign symbols, and letters
hey
Thanks for the reply.
It didn't work tho :/.
I had this in top, before putting yours in:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
still didn't do the job . It's weird.
Re: Foreign symbols, and letters
Well, ive had similar problems and I think its gotta do with codepage and such. You could specify the correct codepage in your serverscripts and try to force it in.
However, the best way ive solved my charachterproblems has been to specify:
<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-8" />
in the head-section of the html.
AND
change the format of the actual files on the server to utf-8.
If you open a serverfile in notepad++ for example and press alt+m (format-menu) it will show you which format notepad++ believes the file is in. The formatmenu in notepad++ also lets you convert the sourcefiles to the desired format. I went through all my sourcefiles and converted them from ansi to utf-8 which made fck function better.
Warning, sometimes converting a file with notpad++ removes or corrupts your non english charachters so pay attention and do some tests before trying this soloution full-force.
regards
Nic
PS, im on these boards searching for a soloution to a similar fck-problem. Namely that some of the file-pickers, fileselectors cant handle filenames with non-english charachters.
The FCKeditor/editor/filemanager/browser/default/browser.html handles filenames well,
the FCKeditor/editor/dialog/fck_image.html handles them poorly.
The fckeditor is so excellently written so this behaviour is surprising. Probably it is something in my legacycode that is disturbing it. Anyway, im very interested in getting info from some1 who understands these things better than me or is having similar problems.
Re: Foreign symbols, and letters
Also check out this thread that has good info on the subject:
viewtopic.php?f=6&t=1655