• hello there!

    I wanted to modify the default wordpress installation sample file “wp-config-sample.php” by opening it and saving it without any changes and guess what; dreamweaver CS3 modifies the encoding of this file making it un-usable to wordpress installation (required by “setup-config.php” which clones it into “wp-config.php” in line 169).

    Since this is strange behavior, I tried to open this file in notepad and save it in different encoding, and her’s the results;

    save as –> ANSI –> works

    save as –> Unicode –> does not work

    save as –> Unicode Big Endian–> does not work

    save as –> UTF –> works

    so at least saving in ANSI or UTF encoding works, but, in Dreamweaver, whatever I try, it doesn’t work, does that mean Notepad is more “intelligent” than DW!!

    The file “wp-config-sample.php” doesn’t contain any header information, just some PHP variables to define that’s maybe why DW miss-understands it (it doesn’t find any header encoding information in the file).

    any help?

    NB: I checked the settings in the DW preferences and tried saving using the BOM signature and without it.. but always the same problem.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t know which encoding DW saves files in, but you should be really careful with proprietary software. Those do often use weird encodings. e.g. never even think of saving a file using Word and believe the encoding will be preserved. (No, I’m not anti-MS. It’s just the way it is)

    I personnally use Notepad++. Up until now, I’ve never had an encoding problem with it. It seems to keep the original encoding.

    Notepad is terrible with encodings. A lot of config, txt whatever files I open using Notepad look terrible. No line breaks, paragraphs. Opening them using Notepad++ they look as they should.

    Ok, this is not an answer to your question, but it is something your might consider.

    Thread Starter Abdessamad Idrissi

    (@numediaweb)

    thanx rizman for the answer.

    Well, I discovered what was missing around with my code; the line break!

    In Dreamweaver, if you go to Edit –> Preferences –> Code format –> you have to set line break type to CR LF (Windows). and that’s it.

    it was set to CR Macintosh.

    have a nice day.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Dreamweaver vs Notepad wp-config-sample.php’ is closed to new replies.