2 Replies Latest reply: Oct 1, 2011 3:10 AM by Lucien Schilling RSS

    Dreamweaver mangles my files....

    Lucien Schilling Community Member

      I have had this now for the second time: my source files change from html to something very strange.

       

      Here is a current example:

      +ADw-html+AD4-

      +ADw-body+AD4-

      +ADwAJQ-

       

      Function stripTags(HTMLstring)

          Set RegularExpressionObject +AD0- New RegExp

          With RegularExpressionObject

              .Pattern +AD0- +ACIAPABbAF4APgBdAD4AIg-

              .IgnoreCase +AD0- True

              .Global +AD0- True

          End With

          stripTags +AD0- RegularExpressionObject.Replace(HTMLstring, +ACIAIg-)

          Set RegularExpressionObject +AD0- nothing

      End Function

       

      I think, it should have to do with "charset utf-8" resp. 7.

       

      The first time I changed inside a html manually the coding, now I changed inside a asp script a string containing the coding instruction.

       

      Does anyone know what happens? How can I reverse, without loosing my files?

        • 1. Re: Dreamweaver mangles my files....
          mytaxsite.co.uk CommunityMVP

          You haven't said what is your default language but assuming it is English then make sure the first few lines of your page is something like this:

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

          <html xmlns="http://www.w3.org/1999/xhtml">

           

          <head>

          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

          <title>Untitled 1</title>

          </head>

           

          If it has nothing to do with doctype then it can only be that your files are getting corrupted when saving to the hard disk.  There simply can't be anything else.

           

          doctype can be almost anything so you need to work it out yourself.

           

          hth

          • 2. Re: Dreamweaver mangles my files....
            Lucien Schilling Community Member

            For the language guess you are right, but only for the first file.

             

            The second file was a asp script, so no language tag. I was editing some quick&dirty generated HTML for mail.

             

            The application is simple... I have a form, calling the script who generates a message according to the form fields entred. As I work and live in Luxembourg, input can be any language (French, German, English, Luxembourgish) or a mix of.

             

            If someone would enter accented or umlaut characters (é, ö or similar), I would get in my email the unicode characters of 2 bytes instead of the representation.

             

            That's why I experimented by putting and/or changing the "charset" identifier from utf-8 to utf-7 to see if that makes a difference. After that precise operation the file got unusable and filled with what I think is dreamweaver internal stuff.

             

            In both cases I edited the source code inside of Dreamweaver and I didn't use any menus or other aids from dreamweaver. In the second case (the one posted), I edited the asp code who put together the mail message. It wasn't at all intended to be interpreted by Dreamweaver.

             

            May be I should also tell my Dreamweaver version: 11 4993

             

            For my initial problem, I found a solution, by converting my input from utf-8 to ASCII (as I don't deal with Chinese and other complex languages this time, I can do that).

             

            FYI: Here is the correct header of my html file:

            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

            <html xmlns="http://www.w3.org/1999/xhtml">

            <head>

            <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

             

            and the header of my asp file:

            <html>

            <body>

            <%