[dokuwiki] Re: Local.php should be saved without ByteOrderMark
- From: Andreas Gohr <andi@xxxxxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Sat, 30 Jul 2005 12:53:16 +0200
On Sat, 30 Jul 2005 15:24:59 +0600
RM <romanrm@xxxxxxxxx> wrote:
> On 7/30/05, David Ing <divirtual@xxxxxxxxxxxx> wrote:
> > Yes, that was it. (My stupidity). Crimson Editor has options for
> > UTF-8
> > "with BOM" and "wo BOM" -- and I obviously forgot which one to
> > use!
> > Not a bug, just user (actually administrator) error.
>
> This is not a user error. BOM is "zero-width non-breaking space", a
> valid part of unicode-containing file, and should be silently ignored
> by correct software.
The problem is with PHP not with DokuWiki. Even if it is zero-width it _is_
output and so PHP starts the output - which is correct behavior IMHO. Also
note, using a BOM is not needed for UTF-8 as it is Byte Order independent -
using a BOM for UTF-8 is optional but discouraged.
> I have fixed the problem by adding the line
>
> ob_start('ob_gzhandler');
>
> at the start of doku.php. This also had a nice "side-effect" of
> enabling gzip-compression of output (read http://webcompression.org/).
> I suggest this line to be included into official dokuwiki code.
As I said before, I think gzip compression is task of the webserver (eg. using
mod_gzip) not of the backend language. Using it has some disadvantages as well:
You can only serve whole pages, this means the user has to wait longer to see
first results of the search for example.
Andi
- References:
- [dokuwiki] auth.php and action.php messages in new 2005-07-13 installation
- From: David Ing
- [dokuwiki] Re: auth.php and action.php messages in new 2005-07-13 installation
- From: Andreas Gohr
- [dokuwiki] Local.php should be saved without ByteOrderMark [was: auth.php and action.php messages in new 2005-07-13 installation]
- From: David Ing
- [dokuwiki] Re: Local.php should be saved without ByteOrderMark [was: auth.php and action.php messages in new 2005-07-13 installation]
- From: RM
Other related posts:
- » [dokuwiki] Re: Local.php should be saved without ByteOrderMark
- [dokuwiki] auth.php and action.php messages in new 2005-07-13 installation
- From: David Ing
- [dokuwiki] Re: auth.php and action.php messages in new 2005-07-13 installation
- From: Andreas Gohr
- [dokuwiki] Local.php should be saved without ByteOrderMark [was: auth.php and action.php messages in new 2005-07-13 installation]
- From: David Ing
- [dokuwiki] Re: Local.php should be saved without ByteOrderMark [was: auth.php and action.php messages in new 2005-07-13 installation]
- From: RM