Menu

UTF 8 no BOM problem

2006-06-11
2012-11-13
  • Nobody/Anonymous

    I select the encoding 'UTF8 without BOM' for a file and then save and close it.
    Sometimes, When I open the file again, the encoding  is reset to 'ANSI'.
    It happens when the file do not contains special chars like 'é', 'à', ... or when it is opened on another computer.
    Is there a way to prevent that ?
    It is anoyingg since I have to encode all my project source files in UTF8 without BOM.

     
    • Nobody/Anonymous

      I have the same problem using utf-8 and php files...

      For some reason I can not save utf-8 files without BOM header, the checkbox is grey :(

       
    • Nobody/Anonymous

      No, if you want to force UTF8 please use encoding with BOM.

       
      • Nobody/Anonymous

        BOM ist no option for me. PHP files with BOM and header:-directives give an error: "headers already sent", surprise. ANSI isn't an option for me, too, since our projects are UTF8 coded and I mustn't mix file types.

        My Workaround: First remove the BOM in a hex-editor and then deploy it. No fun at all.

         
    • Nobody/Anonymous

      It is not always possible to make the difference between ANSI and UTF8 no BOM since some characters are in commons. That's why the Byte Order Mark (BOM) exists.
      The real problem is that its not possible to specify a default encoding format in the Notepad++ settings, (or if it exists I didn't find it ).

       
    • Anonymous

      Anonymous - 2006-06-12

      > The real problem is that its not possible to specify a default encoding format in the Notepad++ settings, (or if it exists I didn't find it ).

      There is an option in "Settings > Preference > New document" but currently it is bugged - N++ changes the option displayed in the "Format" menu but ignores the setting and encodes the file in ANSII.

       
      • Don HO

        Don HO - 2006-06-12

        Tested on v3.7 RC - indeed.

        Does this bug exist in v3.6?

        Could you confirm me that?

        Thank you in advance.

        Don

         
    • Anonymous

      Anonymous - 2006-06-13

      Yes, it was present in the v3.6. I realised the bug just a few days ago and the v3.7 was already in RC stage so I decided to wait and check the v3.7 first if it was corrected there.

       
    • Alexandre Da Costa

      how is possible to get v3.7 RC?
      I'd like to verify the defect 1354429 (UCS-2, char at offset 0x1FFFE is garbage)