Special Characters - copyright

Last post 11-20-2006, 11:42 PM by Adam. 4 replies.
Sort Posts: Previous Next
  •  10-29-2006, 11:42 AM 23886

    Special Characters - copyright

    I am having much difficulty in getting special characters i.e. Ó destined for print to stay put.
     
    When I insert the code <font face="Symbol">Ó</font> into the html, the print preview shows the correct copyright character in the output. When I do this inside cute editor, the editor changes it to <font face=Symbol>Ó</font> which no longer shows up in the print preview.
     
    I have read much in the forums about UseHTMLEntities="False", however this does not seem to apply or impact my output either way.
     
    If I could get cute to leave my code alone, it would work properly.
     
    Thanks in advance.
  •  10-29-2006, 10:20 PM 23891 in reply to 23886

    Re: Special Characters - copyright

    Roboto,
     
    Can you try the following example?

    http://cutesoft.net/example/general.aspx
     
    I can't reproduce the problems there.
     
     
     

    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

  •  10-31-2006, 7:56 AM 23912 in reply to 23891

    Re: Special Characters - copyright

    Adam,
     
    Thanks for the response. I am trying to understand this issue, and honestly it feels like the behavor is a little buggy and defies a concise explination. I see there are others struggling to understand this special characters issue as well.
     
    When I fire the postback code here (hit the save changes button), the special character is either completely stripped out of the HTML by cute, or the characters are substituted for something else as described above. The behavior seems to be different depending on the font used (i.e standard vs. webdings).
     
    Here's the code:
     
    <script language="VB" runat="server">
     Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Page.IsPostBack Then
         
          Dim strSaveFilename as String
          Dim strPersonal as String
          'Dim strDate As Date
          'strDate = Today
          strSaveFilename = txtFileName.Text
          Session("ShortUploadedFileName") = strSaveFilename
          strPersonal = Session("UserID")
          'strSaveFileName = strSaveFileName + strDate
                   
        Editor1.SaveFile("../Templates/" + strSaveFileName) ' + strPersonal)
        Session("SaveFileName") = strSaveFileName ' + strPersonal
        
        MakePDF()
        UpdateDatabase()
        
      Else       
                'Put user code to initialize the page here
       txtFileName.Text = Session("DocumentName")
       Dim DocURL as String
       DocURL = "../Templates/" & Session("DocumentName")
                Editor1.LoadHtml(DocURL)      
            End If 
                   
            
        End Sub
     
     Sub MakePDF()
     
      'ActivePDF Code Here
           
        Dim strDirectory As String
        Dim strFileName As String
        Dim strSaveFilename as String
        strSaveFilename = txtFileName.Text
       
         strDirectory = "c:\inetpub\wwwroot\Templates"
         'strFileName = "HomestarPDFtest.pdf"
         strFileName = strSaveFileName + ".pdf" 'strPersonal + ".pdf"
         Session("NewPDF") = strFileName
         Session("PDFforFTP") = strDirectory + "\" + strFileName
         
        'Instatiate the Server object.
        Dim SVR As APServerNET.APServer
        SVR = New APServer
       
        'Instatiate the WebGrabber object.
        Dim WG As APWebGrbNET.APWebGrabber
        WG = New APWebGrabber
       
        ' Various settings
        Dim intTimeout As Integer = 30
        Dim strIP As String = "127.0.0.1"
        Dim strPort As String = "64320"
       
        ' Set Server properties
        SVR.OutputDirectory = strDirectory
        SVR.NewDocumentName = strFileName
        SVR.PDFTimeout = intTimeout
        SVR.PrintResolution = 600
        'SVR.PaperLength = 1008
        SVR.PaperSize = 5
     
        ' Set WebGrabber properties
        Dim InputURL As String
        InputURL = "file://c:/inetpub/wwwroot/templates/" + Session("SaveFileName")
        WG.URL = InputURL
        WG.EngineToUse = 1
        WG.Timeout = intTimeout
        WG.PrinterTimeout = intTimeout
       
        ' Must call before DoPrint to pass server settings to WG
        WG.Prt2DiskSettings = SVR.ToString()
       
        ' Start the conversion process
        Dim rtnDoPrint As Long = WG.DoPrint(strIP, strPort)
        If rtnDoPrint = 0 Then
         ' Wait for conversion result
         Dim rtnWait As String = WG.Wait(strIP, strPort, intTimeout, "")
         If rtnWait = "019" Then
          ' Wait is successfull
          lblStatus.Text = "Done!"
       
          ' Run WG CleanUp
          WG.CleanUp(strIP, strPort)
         Else
          ' Wait fails
          lblStatus.Text = "Wait Failed: " & rtnWait
          Exit Sub
          
         End If
        Else
         ' DoPrint fails
         lblStatus.Text = "DoPrint Failed: " & rtnDoPrint
         
        End If
       
        ' Clear Objects
        WG = Nothing
        SVR = Nothing
        
     End Sub
     Sub UpdateDatabase()
     
      Dim strUserType as String
      Dim dteCreationDate as Date
      Dim dteLastProductionDate as Date
      Dim strOwner as String
      Dim strImageID as String
      
      strUserType = "User"
      dteCreationDate = "1/11/1969"
      dteLastProductionDate = "1/11/2006"
      strOwner = "Roger Eddy"
      strImageID = "ThisWontWork"
       
      Dim mySQL As String = "INSERT INTO Documents (DocumentName, DocumentType, CreationDate, LastProductionDate, Owner, ImageID) Values('"
      mySQL = mySQL & Session("DocumentName") & "','" & strUserType & "','" & dteCreationDate & "','" & dteLastProductionDate & "','" & strOwner & "','" & strImageID & "')"
      Dim myCon As SqlConnection = New SqlConnection (ConfigurationSettings.AppSettings("DSN_dev"))
      Dim myCmd as SQLCommand = New SQLCommand(mySQL, myCon)
        
      Try
                myCon.Open()
                myCmd.ExecuteNonQuery()
       myCon.Close()
         
            Catch SQLexc As SqlException
                response.Write("Error while accessing Database.  Bad programmer, No Donut!  Error is " & SQLexc.ToString())
       lblStatus.Text = "Error is " & SQLexc.ToString()
       exit sub
            End Try
      
      Response.Redirect("Http://www.matrixworkflow.com/DP/CheckPDFOutput.aspx")
     
     End Sub
    </script>
     
     
    And
     
     
    <CE:Editor id="Editor1" Width="860" Height="750" DisableItemList="Save" DisableAutoFormatting="True" EditCompleteDocument="true" AllowPasteHtml="false" UseRelativeLinks="false" RemoveServerNamesFromUrl="false" ThemeType="Office2003_BlueTheme" AutoParseClasses="false" runat="server" ></CE:Editor>
     
    I am using the .NET 1.1 implementation.
     
     
    In the example you site above, are you doing a
     
    Editor1.SaveFile("../Templates/" + strSaveFileName) ' + strPersonal)
     
    or similar? This call is where the HTML is being changed.
     
    Any help would be appreciated, I am driving my users bonky trying to get this to work.
     
    Thanks in advance.
  •  11-02-2006, 8:05 AM 23976 in reply to 23912

    Re: Special Characters - copyright

    Adam,
     
    I am still looking for some help here.
     
    In the top post there also seems to be a subsitution:
     
    Quote:
     
    When I insert the code <font face="Symbol">Ó</font> into the html, the print preview shows the correct copyright character in the output. When I do this inside cute editor, the editor changes it to <font face=Symbol>Ó</font> which no longer shows up in the print preview.
     
    Please consider this line of HTML
     
    <p style="FONT-FAMILY: Albertus Extra Bold" align=center>Commercial Loans from a <u>Superior</u> Lender ©</p></div></div>
     
    (In case when I submit this it changes, there is a copyright symbol using default font after the word Lender)
     
    and when I fire the code
     
    Editor1.SaveFile("../Templates/" + strSaveFileName) ' + strPersonal)
    The HTML becomes
     
    <p style="FONT-FAMILY: Albertus Extra Bold" align=center>Commercial Loans from a <u>Superior</u> Lender </p></div></div>
     
    Stripping out the symbol.
     
    If using the font Symbol, you get
     
    <p style="FONT-FAMILY: Albertus Extra Bold" align=center>Commercial Loans from a <u>Superior</u> Lender <span style="FONT-FAMILY: symbol">Ó</span>&nbsp;</p></div></div>
     
    to start with and
     
    <p style="FONT-FAMILY: Albertus Extra Bold" align=center>Commercial Loans from a <u>Superior</u> Lender <span style="FONT-FAMILY: symbol"></span>&nbsp;</p></div></div>
     
    after the savefile command.
     
    There has got to be a reason Cute is stripping out these special characters upon a save, and I really need to know how to correct this behavior.
     
    Thanks,
    Roger
     
  •  11-20-2006, 11:42 PM 24455 in reply to 23976

    Re: Special Characters - copyright

    Roger,
     
    I've played with your code in the following example:
     
     
    The HTML code I used:
     
    <p style="FONT-FAMILY: Albertus Extra Bold" align=center>Commercial Loans from a <u>Superior</u> Lender ©</p>
     
    It works for me.
     
     
    Can you test it and tell me which version of Cute Editor you are using?
     
     
     

    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

View as RSS news feed in XML