Losing quotation marks?

Last post 07-11-2006, 3:23 PM by UnlnvlslblE. 3 replies.
Sort Posts: Previous Next
  •  07-10-2006, 3:54 PM 20863

    Losing quotation marks?

    I am using the editor to view some html files.  When I load in the contents of the HTML file, I am losing quotes.  Here is an example.

    Here is what is loaded into the editor:

    <p class=MsoNormal><span style='font-size:14.0pt;mso-bidi-font-size:10.0pt;
    font-family:"Times New Roman";color:black'><span style='mso-tab-count:1'>          </span>“Class,
    you are now sixth graders. That means you are starting to grow up.<span
    style='mso-spacerun:yes'>  </span>You will have more freedom this year, but
    also more responsibility for yourselves,” Ms. Hog had said.<span
    style='mso-spacerun:yes'>  </span>“One of your first tasks will be to build
    yourself a nice strong home. The more you add to this house, the more value it
    will have.” <o:p></o:p></span></p>

    Here is what is displayed in the HTML preview area of the editor once it is loaded in:

    <p class="MsoNormal"><span style="font-size: 14pt; font-family: &quot;Times New Roman&quot;; color: black;"><span> </span>Class, you are now sixth graders. That means you are starting to grow up.<span> </span>You will have more freedom this year, but also more responsibility for yourselves, Ms. Hog had said.<span> </span>One of your first tasks will be to build yourself a nice strong home. The more you add to this house, the more value it will have. <o:p></o:p></span></p>

    We really need a fix for this, please let me know what I can do.  Thanks!

  •  07-10-2006, 4:44 PM 20868 in reply to 20863

    Re: Losing quotation marks?

    UnlnvlslblE,
     
    In the following page:
     
     
    I got the result below:
     
    <p class="MsoNormal"> <span style="FONT-SIZE: 14pt; COLOR: black; FONT-FAMILY: 'Times New Roman'; mso-bidi-font-size: 10.0pt"> <span style="mso-tab-count: 1"> </span>“Class, you are now sixth graders. That means you are starting to grow up.<span style="mso-spacerun: yes"></span>You will have more freedom this year, but also more responsibility for yourselves,” Ms. Hog had said.<span style="mso-spacerun: yes"></span>“One of your first tasks will be to build yourself a nice strong home. The more you add to this house, the more value it will have.” <o:p></o:p></span> </p>
     
    I didn't see any problem with it.
     
    Can you explain it?
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  07-11-2006, 2:49 PM 20897 in reply to 20868

    Re: Losing quotation marks?

    I could be wrong... Maybe the error is on my end.  We are moving around a lot of data and converting it from one thing to another.  It is possible it could be lost in the conversion process.  I will look into this deeper, thanks for trying it out for us!
  •  07-11-2006, 3:23 PM 20900 in reply to 20897

    Re: Losing quotation marks?

    It turns out everything looked right but there was a small error in the logic.  If it helps anyone, when you are using a StreamReader, you need to set it like this:

    StreamReader sr = new StreamReader(filestreamobj,System.Text.Encoding.Default);

    If you don't set that property it reads with some other encoding type and tends to mess with quotation marks.

View as RSS news feed in XML