[dokuwiki] Re: Problem saving modified pages

  • From: Olivier Lumineau <olivier.lumineau@xxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 07 Nov 2006 18:05:59 +0100


Andreas Gohr a écrit :


These three characters look like a BOM with broken encoding (eg. an UTF-8 BOM viewed with latin-1 encoding). Could you check that none of the files you may have edited are saved with a BOM. (config file comes to mind)

Andi

PS: BOM = Byte Order Mark - google for it if you need ;-)

I have the solution !
Indeed it was concerning encoding...

I Searched in Google */BOM "Byte Order Mark" ""/*

and found : http://en.wikipedia.org/wiki/Byte_Order_Mark

"While UTF-8 <http://en.wikipedia.org/wiki/UTF-8> does not have byte order issues, a BOM encoded in UTF-8 may be used to mark text as UTF-8. Quite a lot of Windows <http://en.wikipedia.org/wiki/Microsoft_Windows> software (including Windows Notepad <http://en.wikipedia.org/wiki/Notepad>) adds one to UTF-8 files. However in Unix-like <http://en.wikipedia.org/wiki/Unix-like> systems (which make heavy use of text files <http://en.wikipedia.org/wiki/Text_files> for configuration) this practice is not recommended, as it will interfere with correct processing of important codes such as the hash-bang <http://en.wikipedia.org/wiki/Hash-bang> at the start of an interpreted script. /It may also interfere with source for programming languages that don't recognise it. For example, gcc <http://en.wikipedia.org/wiki/GNU_Compiler_Collection> reports stray characters at the beginning of a source file, and in PHP <http://en.wikipedia.org/wiki/PHP>, if *output buffering is disabled*, it has the subtle effect of causing the page to start being sent to the browser, preventing custom headers from being specified by the PHP script. The UTF-8 representation of the BOM is the byte sequence EF BB BF, which appears as the ISO-8859-1 <http://en.wikipedia.org/wiki/ISO-8859-1> characters "**"/ in most text editors <http://en.wikipedia.org/wiki/Text_editor> and web browsers <http://en.wikipedia.org/wiki/Web_browser> not prepared to handle UTF-8."



So I verified the output_buffering in my php.ini and it was off !
I put it like that : output_buffering = 4096, reload httpd, and now it works very well ! :-)

Thanks

Olivier

Other related posts: