Forums

Dreamweaver vs Notepad wp-config-sample.php (3 posts)

  1. Abdessamad Idrissi
    Member
    Posted 2 years ago #

    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.

  2. rizman
    Member
    Posted 2 years ago #

    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.

  3. Abdessamad Idrissi
    Member
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic