Menu

UTF-8 BOM

2004-12-06
2012-11-13
  • Henning Pridöhl

    An option that disables the UTF-8 BOM would be nice. I work with the template engine smarty and want to have a bom in my header.tpl, which is displayed first. After the header.tpl, there are other templates, which shouldn't have a bom.

    Thanks in advance.

     
    • Don HO

      Don HO - 2004-12-07

      In your case, you can choose "display as UTF-8" from menu then you edit your document. You document is in ansi mode (ie. without BOM) but display as UTF-8.

      Don

       
    • Henning Pridöhl

      It displays as UTF-8 in NP++, but the browsers don't display it as UTF-8. Take a look at http://mole.gnubb.net/krams/npptestcase/test.php. The german umlauts aren't displayed correctly in the output of the content.txt. See http://mole.gnubb.net/krams/npptestcase.zip for the test files.

       
    • Don HO

      Don HO - 2004-12-11

      OK, I see.
      In fact, it is a bug for v2.6 (and older version).

      This bug will be fixed in the next release,
      or
      You can DL the fixed binary here :
      http://notepad-plus.sourceforge.net/commun/misc/notepad++.2.6.bis.zip

      Just create a new file in ANSI mode, set "display as UTF-8" then type whatever characters and save it.

      Don

       
    • Henning Pridöhl

      Thank you, it works well :)

       
    • elsapo

      elsapo - 2005-01-22

      Ah, so whatever "Display as UTF-8" does, it has the important side effect of causing "Save as UTF-8" !!

       
      • Don HO

        Don HO - 2005-01-25

        No.

        The command "Display as UTF-8" just displays an ascii file (without BOM) as an UTF-8 encoded file. When you modify the such file, then save it, it's saved as an ascii file but not UTF-8 file (so no BOM).

        Don