URGENT: Help with CuteEditor and UTF-8 Charset not displaying properly! Please Help!

Last post 03-10-2011, 10:19 PM by honeyxinh. 3 replies.
Sort Posts: Previous Next
  •  03-01-2010, 11:30 AM 59060

    URGENT: Help with CuteEditor and UTF-8 Charset not displaying properly! Please Help!

    Hi there,

    We are using CuteEditor for classic ASP v6
     
    We are having a problem with UTF-8 charsets displaying properly within the CUTE editor when calling re-records from a DB, such as when we wish to edit them.  The same records show fine on pages with no editor, by adding the following line of META to the head:
     
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     
    Below is the code we use to render the editor within these pages. 
    There are no other DOCTYPE specifications anywhere else on these pages:
     
      <%
        Dim editor
       Set editor = New CuteEditor
       editor.ID = "articleText"
       editor.Text = articleText
       editor.EditorBodyStyle = "font:normal 12px arial;"
       editor.EditorWysiwygModeCss = "asp.css"
       editor.Draw()
       %>
     
    We've tried modifying the   s_DOCTYPE="" within the include_cuteeditor.asp page to   s_DOCTYPE="UTF-8" with no luck.  We've also tried toggling the   s_UseHTMLEntities = "true" to   s_UseHTMLEntities = "false" and can't get the editor to show the UTF-8 characters properly.
     
    An example of what we're seeing is:
     
    The record contains the following:  "customer’s time is valuable"
     
    Pages with no editor and the above mentioned META tag show these records as: "customer’s time is valuable" which is the way they should show it.
     
    The editor shows the same records as: " recognizes that our customer’s time is valuable"
     
    I've read through this post and tried the example mentioned, but again with no success.
    We do not specify DOCTYPE anywhere else on pages which contain the CuteEditor.
     
    Can you please provide help with this issue as it's the final step we need to overcome to launch our new portal.
    Thanks so much in advance!
     
     
     
     
     
  •  03-01-2010, 1:09 PM 59071 in reply to 59060

    Re: URGENT: Help with CuteEditor and UTF-8 Charset not displaying properly! Please Help!

    Just wanted to note that the code itself seems to be getting modified by the CuteEditor.  The workflow is:
     
    1. DB exists with UTF-8 characters within records.  Record appears fine on non-editor pages when using META tag from above.
    2. Record is pulled into an update form by ASP page and CuteEditor is pre-loaded with field, which contains UTF-8 characters.
    3. Record is not displayed properly within editor.
    4. Record is updated, without making any changes to any UTF-8 characters which do not display properly.
    5. When the same record is displayed again within non-editor pages, UTF-8 characters NO LONGER display correctly, and appear as funny looking characters instead.  Editing the record in the CuteEditor again doesn't show anything different.
     
     
     
    I hope this helps to explain the process better.
    Thanaks again in advance for any assistance!
  •  03-03-2010, 4:53 PM 59152 in reply to 59071

    Re: URGENT: Help with CuteEditor and UTF-8 Charset not displaying properly! Please Help!

    NPPLDeveloper,
     
    1.
     
    Cute Editor doesn't have code to convert encoding.
     
    To display the string from SQL Server, the following code should work.
     
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <%
    Response.Write "My String from DB"
    %>
    2. Note that there are many encoding schemes in the Unicode standard, but SQL Server only supports one: UTF-16. You need to use N prefix in front of all columns – i.e. UPDATE Table SET Field = N’Unicode Value’;.  Otherwise you will have problems.

     

    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

  •  03-10-2011, 10:19 PM 66623 in reply to 59152

    Re: URGENT: Help with CuteEditor and UTF-8 Charset not displaying properly! Please Help!

    I tried:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> 
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
    and  UPDATE Table SET Field = N’Unicode Value’
    but... it's not working.
     
    I run it on localhost, it displays ok, but, on server, it's still not working
     
    For example:  my paragraph: Hôm qua em đến trường
    And It displays: H?m qua em ?n tr?ng
    what's happens? 
     
    Filed under:
View as RSS news feed in XML