delete Unicode BOM

2005-11-30
2012-11-13
  • Nobody/Anonymous

    Hi there.

    Would it be possible to allow creating Unicode coded files without leading BOM (byte order marker)? That would be very useful.

    For Example: My problem is a PHP script that should send a header and afterwards UTF-8 coded text. If the file starts with a BOM, this is the first byte going to the preprocessor, that sends it immediatelly to the client.
    And that, on the other hand, makes it impossible to use PHP's "header" function. It says errors like "Headers already sent!" 'cause by seeing the BOM it delivers automatically full standard headers.

     
    • Nobody/Anonymous

      Thank you for the hint.

      If there is a German user: Could this be the "Zeige als UTF-8" ("show as UTF-8")? Is there a possibility to ask or contact the German translator of N++?

       
      • Don HO

        Don HO - 2005-12-08

        In English, it was "displayed as UTF-8".

        In order to clarify the command does, it should remain as "Encoding in UTF-8 without BOM".

        Don

         
    • Paulius

      Paulius - 2005-11-30

      For PHP scripts Notepad++ is nearly perfect. At least for me - it is perfect.

      First of all, you must choose 'Format'->'Encode in ANSI' (from the menu). Then, choose 'Format'->'UTF-8 without BOM' (again, from the menu). This way, you will have UTF-8 encoded file without any bytes trashing your scripts output.

      Note: If you're using localized version of Notepad++ - the menu item titles, might be different, but i'm sure you'll find them.

      Good luck!