Menu

UTF-8 Problem

2007-07-13
2012-11-13
  • Nobody/Anonymous

    Hi All,

    I am facing a slight problem with UTF-8 encoding. The problem basically is with UTF-8 (which i need to use) some certain characters are stored at begin of the file when I save it. it doesn't show up in Notepad++ or even notepad. A guy suggested a small C program to read the file content and prove there is some extra characters at the beginning.

    This is causing problem when developing PHP as I can't set session data or do redirects simply because it complains some data have already been sent back. Below is begin of file when reading using C Program:
    -------------
    <?php
    session_start();?>
    <html>
    <head>
    -------------

    How can I overcome this problem? I need permanent solution not work around for this file only.
    My notebad++ version is 4.0.2

    Thanks in advance.

     
    • Eldarion

      Eldarion - 2007-07-13

      I have the same problem (these characters are called "BOM" for "Byte-Order Mark"), but I didn't find any solution yet :'(

       
      • Nobody/Anonymous

        sessions don't work in utf-8 because of BOM.
        Notepad++ has issues with utf-8
        Everybody should be using utf-8 because it makes life so much easier when creating multilingual projects

        Notepad++'s annoyances with UTF-8 is the SOLE reason I stopped using it. I need ALL my files to BE utf-8 and for some reason Notepadd++ (4.5) insisted it be something else. I had to open files in other programs like Dreamweaver and change encoding.

        I'm downloading newest version to see if anything has changed, if not, I'm sticking with Eclipse (feels bloated, but has gotta love the sysntax warnings when you make a mistake ;) )

        Oh, by the way, when will Notepad++ UPDATE ITSELF???

         
    • Nobody/Anonymous

      A company. It feels a bit better. We still need a solution though ;/

       
    • MJG

      MJG - 2007-07-15

      I don't use UTF-8, but I'd like to mention that version 4.1.2 shows a menu option under Format that says "UTF-8 without BOM".  It may not work, or it might not be what you want, but if you don't have it in 4.0.2, you might want to consider updating to the newer version.  --Joel

       
    • Nobody/Anonymous

      npp (version 4.7.5) has two different encodings: "UTF-8" (this makes the problem) and "UTF-8 without BOM"
      You should choose it in the properties dialog.

      In the german version: [Einstellungen] - [Einstellungen] - [Neues Dokument] Klick: "UTF ohne BOM"
      In english something like: [Properties] - [Properties] - [New Document] "UTF without BOM"

      TDittrich42