PHP setcookie fails in UTF8 mode

2005-06-24
2012-11-13
  • Nobody/Anonymous

    After spending an hour figuring out why setcookie() doesn't work in a UTF8 encoded PHP script I've fixed it by encoding the file as ASCII. For the UTF8 version I got notorious "cannot set cookie - headers already sent" warning.

     
    • Don HO

      Don HO - 2005-06-25

      The Item Menu of v3.0 will be more explicit - "UTF8 without BOM". Of course you have to encode in ASCII, since there's no BOM (the header).

      Don