HTML Editor Kit adding extra characters...urgent

I am facing a strange problem in using HTML Editor Kit. I am using JTextPane to display the HTML data, which will support bold, italic and underline formatting.
The problem is, when I
     1]Enter some text of length more than 71, with some spaces inside it ( Do not press enter key explicitly).
     2] And try to read that data from the editor kit.
I find some new line characters inside the data as shown below in the example.
Example :
=========
I entered "Testing the HTML Editor Kit functionality .. as well as Apply functionality too.. as these are giving some problems. what can be the reason. try to find out that..." in the Editor Pane and Editor Kit is generating the following HTML for it.
<html>
<head>
</head>
<body>
<p name="Normal">
Testing the HTML Editor Kit functionality .. as well as Apply
functionality too.. as these are giving some problems. what can be the
reason. try to find out that...
</p>
</body>
</html>
Although I haven't entered any new line between the paragraph tags, still you can find that the editor kit is adding some new line characters and 6 spaces from line to line. One consistency about this behavior is that it enters this stuff after 71 characters only with some special cases.
How can we change this behavior. What all I need is I want the data in a simple string like
"<html><head></head><body><p name="Normal">Testing the HTML Editor Kit functionality .. as well as Apply
functionality too.. as these are giving some problems. what can be the reason. try to find out that...
</p></body></html>"
Any solution???
Thanks
Priyatam

That's strange isn't it? Class HTMLWriter sets the line length for HTML output to 80 chars per line. Strangely JEditorPane seems not to ignore these newline chars although the actual newline is not performed within JEditorPane.
See http://java.sun.com/j2se/1.3/docs/api/javax/swing/text/AbstractWriter.html#setLineLength(int)
about how to set the line length.
Hope that helps
Cheers
Ulrich

Similar Messages

  • Add hyperlink in mail is adding extra characters to URL

    When I paste the add a hyperlink to a page called Recent News on my .mac site, extra characters are added to the url causing the page not to be found.
    "...Site/Recent%20News/D3A....html" becomes "...Site/Recent%2520News/D3A....html". I have no problem adding a hyperlink for my welcome page. Any ideas?

    I don't know how to fix it, but I can at least tell you what's happening. The "%20" is the encoding for a space character in a URL, " ". This is being turned into "%2520" because the "%" is being encoded as "%25" (the encoding for "%" in a URL), so "%20" is turning into "%2520".

  • Iweb adding extra characters - encoding as Latin-1 instead of UTF-8?

    mines.edu/academic/met/jip/
    Can't get the extra characters off this page. When you view source, it shows extra characters in. When page encoding is changed to UTF-8, works just fine. However, the school webmasters say it is not a problem on server side (not that I believe them). Any thoughts?

    However, the school webmasters say it is not a
    problem on server side
    They are wrong. The server is (mis)configured to force all browsers to use the wrong encoding for your page. They can correct that or someone can put an .htaccess file in your space as described in the link provided earlier.

  • HTML Editor kit Line Space Problem

    I am using the HTMLeditor Kit i want to achieve line spacing in it. i have tried two ways one by specifying the line-height attribute directly into p tag and or secondly by using the StyleConstants attribute StyleConstants attribute StyleConstants.setLineSpacing and passing the MutableAttribute Set and linespaceno into it...
    In first case i m getting the same linespace irrespective whatever i mentioned in line-height, however if i save the backend generated html and open it in Internet Explorer it works fine.
    In second option i get content tags and but one the tag gets centre aligned and secondsly it does not woirk properly also.
    Can somebody can give me a clear insight that what i can do to achieve this line space functionality

    Yes please someone explain how to change the line spacing in a text/html accepting component, in my case JEditorPane. My need is specifically this -- I want to display variable font size text including superscripts all in HTML at a single unmoving height on JEditorPane. I believe increasing the line spacing sufficiently will enable this to happen, but how does one setLineSpacing on a JEditorPane component?
    Sorry I could'nt help the original post in this thread!

  • HTML Editor Kit

    Hi,
    I want to display following html in JEditotKit.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <title>ExploreCollbarativeNetworks</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    INPUT.fancyButton
              font-family: Verdana, Arial,Georgia;
              border-right: #000000 1px solid;
              border-top: #000000 1px solid;
              font-weight: bold;
              font-size: 11px;
              border-left: #000000 1px solid;
              cursor: hand;
              color: black;
              border-bottom: #000000 1px solid;
              height: 20px;
              background-color: #F3F9FF;
    <!--
    body {
         margin-left: 0px;
         margin-top: 0px;
         margin-right: 0px;
         margin-bottom: 0px;
    .style1 {
         color: #FF7830;
         font-weight: bold;
    -->
    </style>
    <link rel="stylesheet" href="style.css" type="text/css">
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function openfile()
         document.execCommand("Open",null,"index.htm")
    function Saveasfile()
         document.execCommand("SaveAs",null,"index.htm")
    function showques()
         tot=0;
         for(i=0;i<document.form1.c.length;i++)
              if(document.form1.c.checked==true)     
                   tot=tot+1                                             
         if(tot==1)
              //alert("sssssssss")
              ob=document.getElementById('table1')
              ob1=document.getElementById('p1')
              ob.style.display="block"
              ob1.style.display="none"
              document.form1.next.disabled=true
         if(tot==2)
              ob=document.getElementById('table1')
              ob1=document.getElementById('p1')
              ob.style.display="block"
              ob1.style.display="none"
              document.form1.next.disabled=false
         //alert(tot)
    function showques1()
         ob=document.getElementById('table1')
         ob1=document.getElementById('table2')
         ob.style.display="none"
         ob1.style.display="block"
         document.form1.previous1.disabled=false
    function showques2()
         ob=document.getElementById('table1')
         ob1=document.getElementById('table2')
         ob.style.display="block"
         ob1.style.display="none"
         document.form1.previous.disabled=false
    //-->
    </SCRIPT>
    <style type="text/css">
    <!--
    .style2 {font-size: 2pt}
    .style13 {color: #000000}
    .style15 {font-size: 12px}
    .style16 {font-size: 12px; color: #000000; }
    .style17 {color: #CCCCCC}
    .style19 {color: #F1F4F8}
    .style22 {color: #FFFFFF}
    -->
    </style>
    </head>
    <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <form name="form1" method="post" action="">
    <table width="975" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td>
    <TABLE border="0" cellspacing="0" cellpadding="0" width="975" align="center">
    <TR>
    <TD width="100%" >
    <TABLE width="975" border="0" align="center" cellpadding="0" cellspacing="0">
    <TR>
    <TD >
    <table width="750%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td>
    </td>
    </tr>
    <tr>
    <td>
    <table width="750" border="0" cellspacing="1" cellpadding="1" align="left" bgcolor="#FFFFFF" bordercolor="#CCCCCC">
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2"><img src="images/forum.gif" width="94" height="31"></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr bgcolor="#DDEEFF" valign="middle">
    <td width="6%" height="20" align="center"><b>  <img src="images/plusbottom1.gif" width="11" height="11" align="absmiddle" id="img" border="0"></b></td>
    <td width="94%" align="left" bgcolor="#DDEEFF">
    <b> <span class="bgcolor2">Please name your
    GM partnership? </span></b></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2">
    <div style="display:none" id="d1">
    <table width="734" border="0" id="t1" style="display:none" align="right">
    <tr>
    <td width="10 px" valign="top" height="20" bgcolor="#EBEBEB" >
    <div align="center"><strong>Q.1</strong></div>
    </td>
    <td width="724" bgcolor="#EBEBEB" align="left" >
    <div align="justify"><b class="bgcolor1">Please
    name your GM partnership? </b> </div>
    </td>
    </tr>
    <tr>
    <td width="10 px" valign="top" height="20" align="center" ><b>Ans</b></td>
    <td width="724" align="left" >fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf </td>
    </tr>
    <tr>
    <td width="10 px" valign="top" height="20" bgcolor="#EBEBEB" >
    <div align="center"><strong>Q.2</strong></div>
    </td>
    <td width="724" bgcolor="#EBEBEB" align="left" >
    <b>What is you role on the partnership?
    </b> </td>
    </tr>
    <tr>
    <td width="10 px" valign="top" height="20" align="center" ><b>Ans</b></td>
    <td width="724" align="left" >fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf </td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    <tr bgcolor="#DDEEFF">
    <td width="6%" bgcolor="#DDEEFF" height="20" align="center"><b >  <img src="images/plusbottom1.gif" width="11" height="11" align="absmiddle" id="img1" border="0"></b></td>
    <td width="94%" align="left"> <b> <span class="bgcolor2">Please
    name your GM partnership? </span></b></td>
    </tr>
    <tr>
    <td colspan="2"></td>
    </tr>
    <tr>
    <td colspan="2">
    <div style="display:none" id="d2">
    <table width="734" border="0" style="display:none" id="t2" align="right">
    <tr bgcolor="#EBEBEB" align="left">
    <td width="10 px" valign="top" height="20" >
    <div align="center"><strong>Q.1</strong></div>
    </td>
    <td width="724" bgcolor="#EBEBEB" align="left" >
    <div align="justify"><b>Please name your
    GM partnership? </b> </div>
    </td>
    </tr>
                                                 <tr>
    <td width="10 px" valign="top" height="20" align="center" ><b>Ans</b></td>
    <td width="724" align="left" >fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf </td>
    </tr>
    <tr bgcolor="#EBEBEB" align="left">
    <td width="10 px" valign="top" height="20" >
    <div align="center"><strong>Q.2</strong></div>
    </td>
    <td width="724" align="left" >
    <div align="justify"><b>What is you role
    on the partnership? </b>
    </div>
    </td>
    </tr>
                                                 <tr>
    <td width="10 px" valign="top" height="20" align="center" ><b>Ans</b></td>
    <td width="724" align="left" >fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf fgdhsgfjhdsgfjhsdgfhd
    dsfgdsf sdgfsdjf sdgfsdjhf sdfgsdjf dsfgdjsf
    sdhjfgdsjf dsfgdsjf sdfgsdjf sdfgsdjhf
    dsfgdjshf dsfgdsjhf dsfgdsjf </td>
    </tr>
    <tr>
    <td width="10 px"> </td>
    <td height="94%" width="724" align="left"> </td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    <tr>
    <td colspan="2"> </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <td> </td>
    </tr>
    </table>
    </TD>
    </TR>
    </TABLE>
    </TD>
    </TR>
    </TABLE>
    </td>
    </tr>
    </table>
                   </form>
                   <script>
                   function show()
                        obj=document.getElementById("img")
                        obj1=document.getElementById("d1")
                        obj2=document.getElementById("t1")
                        obj3=document.getElementById("img1")
                        obj4=document.getElementById("d2")
                        obj5=document.getElementById("t2")
                        check=false
                        if(obj1.style.display=="none")
                             obj.src="images/minusbottom1.gif"
                             obj1.style.display="block"
                             obj2.style.display="block"
                             obj3.src="images/plusbottom1.gif"                         
                             obj4.style.display="none"
                             obj5.style.display="none"                         
                             check=true
                        if(!check)
                             obj.src="images/plusbottom1.gif"
                             obj1.style.display="none"
                             //alert(obj2.src)
                   function show1()
                        obj=document.getElementById("img")
                        obj1=document.getElementById("d1")
                        obj2=document.getElementById("t1")
                        obj3=document.getElementById("img1")
                        obj4=document.getElementById("d2")
                        obj5=document.getElementById("t2")
                        check=false
                        if(obj4.style.display=="none")
                             obj.src="images/plusbottom1.gif"
                             obj1.style.display="none"
                             obj2.style.display="none"
                             obj3.src="images/minusbottom1.gif"                         
                             obj4.style.display="block"
                             obj5.style.display="block"                         
                             check=true
                        if(!check)
                             obj3.src="images/plusbottom1.gif"                         
                             obj4.style.display="none"
                   </script>
                   </body>
                   </html>
    It is generated by our web designer, I am not knowing anything abt html. When i tried to display it in JEditor kit, it is not displayed properly.
    JEditorPane jPane = new javax.swing.JEditorPane();
    jPane.setDocument(getHTMLDocument());
    My getHTMLDocument() is as under :
    public HTMLDocument getHTMLDocument()
    HTMLDocument m_oHTMLMessageDoc = new HTMLDocument();
    HTMLEditorKit m_oHTMLEditor = new HTMLEditorKit();
    InputStreamReader in = null;
    m_oHTMLMessageDoc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
    try {
    in = new InputStreamReader(new FileInputStream("d:\\help.html"));
    m_oHTMLEditor.read(in, m_oHTMLMessageDoc, 0);
    catch (IOException ex) {
    ex.printStackTrace();
    catch (BadLocationException ex) {
    ex.printStackTrace();
    return m_oHTMLMessageDoc;
    It is displaying javascript functions as text.
    Can anybody please help me to display this html file.
    Thanks in advance,
    Dimple

    1) Swing related questions should be posted in the Swing forum.
    2) Use the "code" formatting tags when posting code, so the code is readable
    3) Swing components don't support JavaScript

  • How to retrieve the link's label with HTML Editor kit?

    Hi all,
    I need to retrieve the label that is on a HREF html attribute.
    In other words I need to retreive the words "Home Page" from
    this snippet:
    <b>Home Page</b>
    I have found tutorials that show how to extract the link itself
    but not the label ....:-(
    can anybody help me?
    Thanks
    Francesco

    Hi,
    if you have a HTMLDocument you can look into the element structure of this document to find a certain A tag as follows   /**
       * find the next link attribute from a given element upwards
       * through the element hierarchy
       * @param elem  the element to start looking at
       * @return the link attribute found, or null, if none was found
      public static Element findLinkElementUp(Element elem) {
        Element e = null;
        Object linkAttr = null;
        Object href = null;
        while((elem != null) && (linkAttr == null)) {
          e = elem;
          linkAttr = elem.getAttributes().getAttribute(HTML.Tag.A);
          if(linkAttr != null) {
            href = ((AttributeSet) linkAttr).getAttribute(HTML.Attribute.HREF);
          elem = elem.getParentElement();
        if(linkAttr != null && href != null) {
          return e;
        else {
          return null;
      }When this method returns an element, its start and end can be used to extract the link text.
    Ulrich

  • Problem with richtext editor. How to disable editor from adding p tags automatically?

    CQ Richtext editor is adding extra <p> tags when we have html5 <header> tag in the content. The para tags are added every time we open it for editing automatically. Is there a way to disable this?
    Regards,
    Pratap

    Try adding the following to dialog.xml for that RTE (see cq5 widgets api @ http://dev.day.com/docs/en/cq/current/widgets-api/index.html)
    removeSingleParagraphContainer="{Boolean}true"

  • APEX - Textarea with HTML Editor.

    All,
    I am working with Application Express Version 2.2.1.00.04
    I have the following problem:
    I have an item "Textarea with HTML Editor" which I am inserting
    information CLOB in a table.
    This data is consulted by a Region Report of APEX which has a Link that
    will be a popup. Inside the report, I use wwv_flow_utilities.URLENCODE
    (here the column is a CLOB) where it gives me the error "ORA-06502:
    PL/SQL: numeric or value error: character string buffer too small".
    I started to investigate which might be the problem and saw that the
    item "Textarea with HTML Editor" usually inserts special characters.
    I show an example of the special character that inserts and which is the
    error.
    SELECT wwv_flow_utilities.URLENCODE(' ')
    FROM dual;
    This character, which is like a space in target, is bringing problems to
    be able to execute the report.
    A provisional solution to solve this problem is to put a REPLACE into
    the Query.
    Has anyone this problem.???? Do you know why this character can be
    inserted??????
    Thx..

    Thanks Dimitri!
    I'm trying to find this place in the application but I don't have enough privileges. Here, we are working with Application Express 2.2.1 and we have to upgrade to 3.1.1.
    In order to improve the behaviour of HTML Editor Standard, I think we should integrate FCK to our application, do you know about any step by step explanation to achieve this? Because I was searching this information in the forums, but I can't find anything. Please, any information you can share with me will be very helpful
    Thanks again!

  • Contacts notes still have extra characters

    No device
    I have a pre that's 2 yrs old.  I have been reading that the extra characters  < br / >  issue is known; in fact 2 other posts from 2010 were closed.  I still have this problem; I added a contact 10 minutes ago and notes still added extra characters.  The extra characters have never gone away since arriving a year (?) or more?  any help coming?

    Hmm...
    OK - I just went into icloud settings on my iphone and figured I would toggle off the notes, back out and then go back and toggle notes back on... this was the one set of data that wasn't critical if I list it. 
    Notes came back, reminders are now back and contacts are now back... Still would love to know why these all disappeared in the first place.  All seems to be back to normal though. 

  • Extra characters getting appended after decoding

    Hi All,
    I am trying to decode the special characters by using the following function
    public static String decode(String str) throws Exception
    byte[] b0 = new byte[str.length()];
    Pattern p = Pattern.compile(
    "\\G(?:=(\\p{XDigit}{2})|[\\p{Graph}\\p{Blank}&&[^=]])");
    Matcher m = p.matcher(str);
    int idx = 0;
    while (m.find())
    b0[idx++] = m.start(1) != -1
    ? (byte)(Integer.parseInt(m.group(1), 16))
    : (byte)m.group().charAt(0);
    // byte[] b1 = Arrays.copyOf(b0, idx);
    return new String(b0, "UTF-8");
    But if i decode "=C2=A365=20sheetal " to £65 sheetal..,the decode is proper but it is adding extra characters like £65 sheetal?????? at the end .
    How can i make my decode function not to add extra characters?OR HOW CAN I JUST SAVE "£65 sheetal " THIS VALUE??
    THANKX

    The problem got solved..,its decoding every extended bit values.
    The function was changed little bit.Array copy is done using for loop.
    public static String decode(String str) throws Exception
    byte[] b0 = new byte[str.length()];
    Pattern p = Pattern.compile(
    "\\G(?:=(\\p{XDigit}{2})|[\\p{Graph}\\p{Blank}&&^=])");
    Matcher m = p.matcher(str);
    int idx = 0;
    while (m.find())
    b0[idx++] = m.start(1) != -1
    ? (byte)(Integer.parseInt(m.group(1), 16))
    : (byte)m.group().charAt(0);
    // byte[] b1 = Arrays.copyOf(b0, idx);
    byte[] b1=new byte[idx];
    for(int i=0;i<idx;i++){
    b1=b0[i];
    return new String(b1, "UTF-8");
    Can any one say me,why euro symbol appears as ? in web-ui ,but it is saved in database as euro symbol itself?
    Thankx

  • Why is my Air Mac keyboard typing extra characters?

    Why is my MacBook Air kayboard adding extra characters as I type? It looks like this:
    W@hy6 i8s my6 MacBo9o9k Ai8r4 ke3y6bo9ar4d addi8ng e3xt5r4a char4act5e3r4s as I* t5y6pe3?

    Start up in Safe Mode.
    http://support.apple.com/kb/PH11212
    If this does not help, you have to take the computer to the Apple store to have it
    checked out.

  • APEX Supplied HTML Editor (fckeditor) - Limit number of characters

    Hi
    Has anyone found a way of limiting the number of characters allowed in the HTML Editor that is supplied with APEX (3.1/fckeditor)
    I have had a look at the fckeditor web page and found a couple of plugins but I fear that this approach will require me to manually implement fckeditor, and not use the inbuilt one.
    I would also prefer to not do this with an application process as the user can overflow the editor and get the HTTP-400 Value param too long error.
    Regards
    Matt

    Dribble!
    does this help? Is their anyway to limit the character count on a textarea with html editor

  • Printing pdf - extra characters added

    When printing from a downloaded pdf to another pdf or to hardcopy on our HP printer, extra characters are being added.  For example, the letter "j" is being added to the end of every word in one italicized paragraph, while a ":" is being added to the end of every word in another italicized paragraph.  The problem does not occur for all italicized items or paragraphs, only some.  I'm using Acrobat Professional 8.1.4.  This problem does not occur when using Acrobat 5 (which we have on one computer here for various reasons).  I've tried optimizing and flattening but they seem to have no effect.  Any ideas?  (There is no way to access the original source document used to generate the original pdf - I have re-downloaded it with no change.)

    Try updating AA8. It is currently at AA8.2.3. May not solve the problem, but worth the try.

  • [mysql] Extra Characters Added

    I've just switched to mySQL from Access. When I add a new
    News Article to the site using my CMS extra characters are added to
    the beginning of the "longtext" columns. You can see it here after
    the published date.
    http://www.ncadfed.org/news/?loc=news&n_id=24
    Does anyone know how to stop this from happening.
    I'm using CFMX6 and mySQL4
    Thanks

    I hope I don't have to do that as I'd have to switch 100
    cfupdates and cfinserts. I'm on shared hosting so I have to use
    mySQL 4 since that is all they offer at this time. I've sent the
    following link to my host with no response, I'm hoping it will fix
    it. I read in a post that it does.
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_18952
    Its a hotfix for cfupdate and cfinsert.
    Thanks

  • HTML editor (URGENT...PLEASE PLEASE)

    Hi,
    I developp an HTML editor (JTextPane) and I have several problems :
    1) when I use setText() to load some code I have generated previously, there is a new line which is inserted at the end of the document (new paragraph in fact). how can I remove it?
    2) when I insert a new image (<IMAGE SRC=....>) at the beginning of a paragraph the image is inserted at the end of the previous paragraph
    3) the editor is an applet. So when I insert an animated gif in a document and reload the applet the gif disappears. I have read that Image.flush must be used but this method deletes some components!
    Thank you

    hi,
    I am also working HTML editor.
    Can u send me the code which u have written to insert images.
    I could help u .
    My id is [email protected]
    regards,
    aravind.

Maybe you are looking for

  • Open document from a webfolder

    Hi. I have got a procedure which writes BLOBS to a directory onto Oracle XDB (for example ms office docs). /public/docs/test.doc Is there a pl/sql package for opening the file test.doc in ms word so that the user can directly edit the document in XDB

  • Find and copy files by file name

    Hey Gang, I sure hope you guys can help me out. I'm looking for a piece of software that can read a txt file or spreadsheet to find specific files and copy them from one place to another. In other words, I have a folder with 1000 files in numerical o

  • How do I get Firefox to start up without trying to dialout? (Work offline setting is not saved on restart.)

    My home page is a local file. I do not want my browser dialing out at start up. It is hard to tell if there is a trojan or virus when it tries to dial out before I try to load a page. I turn off most automatic updates on extensions that have a settin

  • Formatting in Answers

    Hi, How would I format a numeric value to display blank if it's 0 and conversely, how would I display 0 if the value is null. Thanks, rkingmdu

  • Printed document is jumbled up gurbish,

    printed document is jumbled up gurbish, not legible. looks like another language. I.e.. bank statement with lots of numeric. Any time I print my bank statements this happens. HP 4215 Office Jet All-In-One