HELP!!! character display problem in JEditorPane

hi,
I got a headache with my program which needs to display multiple language html page in a JEditorPane. For example, if user requests a Chinese page then page is read in from an inputstreamreader using Chinese charset encoding. But what JEditorPane displays is squares and this is a very common font problem. I did everything I can
copy font.properties.zh to font.properties
set JEditorPane font as Font("SIMSUN",Font.PLAIN,12)
with the bug unsolved so far.
I am using Windows 2000/ME in UK locale.
Anybody could help please???

yes, the input data, for example in the case of Chinese Simpilify Character, is read in using a decoder with charset GB2312. I think I can print them out on prompt console but in a unrecognizable format.
Anyway, I would like to reconfirm the steps I took: (Presumably I know I am going to load a Chinese page)
1. rename font.properties.zh to font.properties
2. set the font of JEditorPane as ("SIMSUN",Font.PLAIN,12)
3. when try to load a Chinese page, there should be a ChangedCharSetException. extract the charset from the exception and use it to construct a new InputStreamReader.
4. I also set the content-type of JEditorPane as something like "text/html; charset=gb2312"
5. read in the data and parse it into a HTMLDocument instance.
6. finally use setDocument method to display the document on the JEditorPane.
In this way, the page gets displayed in unknown characters.
Anybody could show me something different but feasiable? Please!!!

Similar Messages

  • OO4 character Display Problem

    Hi All,
    I am using Oracle OLE objects to connect to Oracle 9.2 DB
    The NLS Language for the Database is AMERICAN_AMERICA.AR8ISO8859P6
    the client is using also the same NLS.
    When I retrive the information using OO4 some varchar2(Arabic Language) are return incorrectly from the DB, however when I use ADO on the same clinet it's correctly retrive all Data.
    I've only on home at my PC, and its NLS language is correct, even when I use SQL*Pluse the characters are displayed correctly.
    I also retrieved the NLS_LANG from the application using "SELECT USERENV ('LANGUAGE') FROM DUAL"
    and it was correct using ADO and OO4.
    Of course I've checked the registry value NLS_LANG and it's also AMERICAN_AMERICA.AR8ISO8859P6
    Any Help????

    I think after all it is a problem with the either:
    a. OS installer, which should really try to delete fonts which are duplicated by new system fonts
    b. OS which should give precedence to new system fonts over old system fonts where there are two the same, especially when the system fonts are in /System/Library/Fonts and the old ones are in /Library/Fonts
    The major annoyance is that this problem appeared with Leopard and took me hours of searching to figure out its origin - when you don't know if it is a character entry problem (which I thought) or a character display problem (which it turned out to be). In the end the fix was simple - delete the superceded fonts.

  • Character display problem latin characters

    For some reason old fonts show latin characters when i type "o/" and "l/". The problem seems confined to old fonts (at least Geneva; Monaco; New York), so I guess it is a bug?

    I think after all it is a problem with the either:
    a. OS installer, which should really try to delete fonts which are duplicated by new system fonts
    b. OS which should give precedence to new system fonts over old system fonts where there are two the same, especially when the system fonts are in /System/Library/Fonts and the old ones are in /Library/Fonts
    The major annoyance is that this problem appeared with Leopard and took me hours of searching to figure out its origin - when you don't know if it is a character entry problem (which I thought) or a character display problem (which it turned out to be). In the end the fix was simple - delete the superceded fonts.

  • Character display problem

    Hi All,
    When ever capital 'w' (i.e W, plain,Dialog and size 11) is first character in a text field left upper portion is not visible.But if I change any of these properties( i.e plain,Dialog, size 12) there is no problem.
    Can any body suggest me how can I display 'W' correctly with these propeties(i.e W, plain,Dialog and size 11).
    Thanks in advance

    I think after all it is a problem with the either:
    a. OS installer, which should really try to delete fonts which are duplicated by new system fonts
    b. OS which should give precedence to new system fonts over old system fonts where there are two the same, especially when the system fonts are in /System/Library/Fonts and the old ones are in /Library/Fonts
    The major annoyance is that this problem appeared with Leopard and took me hours of searching to figure out its origin - when you don't know if it is a character entry problem (which I thought) or a character display problem (which it turned out to be). In the end the fix was simple - delete the superceded fonts.

  • Character display problems....11g connecting to SQL server

    Hi Gurus,
    db: 11.2
    os: redhat 5.5
    there is a problem when with character display with sqlplus and even worst on TOAD, SQL Developer tool.
    there is a Heterogeneous connection between 11g and ms sql serever. i use freedts, unixodbc and dg4odbc to establish the connection.
    using isql tool...the select statement was well formatted..see sample |
    | Ventes USIM |
    | Resprise de charge provisionnees sur creance BUT when i use sqlplus some character are shattered..please see sample
    COST_NAME
    V e n t e s U S I M
    R e s p r i s e d e     c h a r g e p r o v i s i o n n e e s s u r c r e
    a n c ein other client tool e.g TOAD the output is worse just show only the first character of each row e.g V
    i have tried french and english value for nls_language but did not solve the problem.
    anybody with a clue of what is wrong...thanks

    It looks like some wrong character set conversion (more exactly -- lack of it) involving UTF-16 from MS SQL Server NVARCHAR data type. I cannot tell what went wrong and if this is a bug as I do not have experience with this configuration. Please, work with Oracle Support to diagnose and fix this issue.
    -- Sergiusz

  • Crystal Report Oracle ODBC driver invalid Thai character display problem

    Hi,
       My server has CR Oracle ODBC 5.1 installed on last week. We have several reports in the servers which called by our Application to export to text file and pdf file. Sometimes, the output (both text file and pdf file) can't display Thai character correctly. The text file show Thai character in question mark and pdf file show in square box. This problem occur randomly and disappear without doing anything. Sometimes the problem occur for an hour and gone but sometimes occur 10-15 minutes and gone. This problem also not happen every days. Once the problem occur, all reports with Thai character will fail.
       However, we have another server installed the same Application, same OS level, same OS patches and same CR Oracle ODBC driver version installed on the same time as above server (the problem server). This server does not have any problems.
       Any suggestions would be appreciated.
    Best Regards,
    Noppadon S.

    Hi Noppadon,
    Thank you for the info. If it happens randomly in their application then it's something they need to debug. Could even be in the ODBC driver.
    I suggest you tell them that because it works sometimes it shows the issue is likely in their software because if it failed all the time then it would be in Crystal dll's. They need to debug the problem, suggest they use tools like Process Monitor from www.sysinternals.com to step through to see where or what part is failing. If they having logging abilities that may help to find out what step is failing and in which API.
    At this point we have no way of determining where the problem is, it's failing in their application and no one but them know what or how they are using CR runtime files.
    If you can duplicate the problem using Crystal Report Designer then it's our problem, if not they have to help you to show us it is a CR issue.
    Sorry we can't be of more help but without know their code we can't suggest anything to try. Suggest they log a call with support here to help them debug the problem if they don't know what to do.
    Thank you
    Don

  • Slovakian Language (SK) character display problem

    Hi,
    Enviroment:R3 enterprise 110 /unicode/Oracle
    I'm having problem with one of the character for Slovakian. It seems that the character are display correctly when displaying thru Customer master data display (FD03 ) but show garble character (# etc) when display thru FD10N or FB03.
    Can anyone please guide me on where to look at or is this something I should refer to SAP?
    Thanks for any feedback

    I found out what was the problem. It is the configuration of the character set in I18N. I've to set this character set to "Central European" and it works fine.
    The only problem that I had now is a programmer having problem displaying some of the SK language? Please help!!!.

  • Japanese Character Display Problem

    It seems like the new JRE does not allow Japanese characters to be displayed on anything but the title bar of an application when running on a US English XP SP2 system with all of the proper language support installed.
    I can see the Japanese Characters in the title bar, but in the rest of the application, they appear as outlined blocks. All of the text is coming from the same resource bundle so I know that it is loading correctly because it appears in the title bar correctly.
    On a Japanese system with XP SP2, everything works as expected. Is there anything that I can do to correct this? I am using JRE 1.4.2 to compile the application, and the latest JRE to display it.
    Any help would be greatly appreciated.
    -Steve

    HI out there,
    i'm having similiar problems when trying to parse / transform a database-generated xml-string containing Japanese characters into an html using a saved xsl file. I've tried zillions of ways (got from specialized forums) to do it getting hardly the same result all the time.
    Now the point is that i'm getting the known-by-all "???" characters
    but i've checked that the xml string is Genereted correctly from
    the database using in my JSP page:
    String aux = new String(TXT_FROM_DATABASE.getBytes("ISO-8859-1"), "UTF-8");...
    then the JSP sets
      request.setCharacterEncoding("UTF-8"); (not necessary i guess)
       response.setContentType( "text/html; charset=UTF-8" ); and calls a function XML2HTML (from a *.class) that makes necessary
    operations to call the transformer.transform method:
    // auxiliary function to convert the string into UTF-8 (to ensure)
    // has been tested that when calling to xml2html the String xml_string
    // is correctly formed and does contain all japanese characters (all)
    public static String convertString(String s, PrintWriter pw_out) {
           try{
             if(s == null) return s;
             String aux = "";
             byte[] bari = s.getBytes("ISO-8859-1");
             aux = new String(bari, "UTF-8");
             return aux;
           }catch (Exception e){
             pw_out.print(e.getMessage());
             return "";
      public static void XML2HTML(String xml_string, String xsl_file, ServletRequest req,
          ServletResponse res) {
          PrintWriter p_out=null ;
          String appdir = req.getRealPath("/"); 
          try{
            p_out = res.getWriter(); 
          } catch (Exception ioException){
            System.out.print(ioException.toString());
          // transformating ...
          try {
          // Creating the transformer object from the XSLT_file
          javax.xml.transform.stream.StreamSource xslFile  = new StreamSource(new File(appdir+"\\"+xsl_file+".xsl"));
          javax.xml.transform.TransformerFactory factory = TransformerFactory.newInstance();
          javax.xml.transform.Transformer transformer = factory.newTransformer(xslFile);
          transformer.setOutputProperty(javax.xml.transform.OutputKeys.ENCODING,"UTF-8");
          transformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT,"yes");
          transformer.setOutputProperty(javax.xml.transform.OutputKeys.METHOD,"html");
         // create the source Stream
          String xmldata = convertString(xml_string,p_out);
          StringReader xml_sr = new StringReader(xmldata);
          StreamSource xml_source = new StreamSource(xml_sr);
          // result Stream
          javax.xml.transform.stream.StreamResult outResult = new javax.xml.transform.stream.StreamResult(p_out);
           //calling the transform method !! (source/result)
          transformer.transform(xml_source,outResul
          } catch (Exception e){
            p_out.print ("<br/>EXCEPTION__" + e.toString());
            p_out.print ("<br/>CAUSE" + e.getCause());
            p_out.print ("<br/>nMSG" + ((TransformerException)e).getMessageAndLocation());
    } and my XSL DOES contain these lines at the very beginning:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" encoding="UTF-8" media-type="text/html; charset=UTF-8"/>more:
    * all my files are saved as UTF-8
    what makes me go crazy:
    * In the jsp after the call to the xml2html method i've written
    <%=xml_string%> and it does write "????" characters for all elements
    except for one of them (japanese word that i wrote out directly in japanese,
    but if in the jsp page i INCLUDE
      <%@page language="java" pageEncoding="utf8" contentType="text/html; charset=UTF8"%>
    THEN THIS only written-out element in japanese is not displayed correctly either.
    and even MORE !
    if in the xsl file i include:
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      </head> it does not display it correctly neither...
    is this possible ?
    may the problem be that the function i'm calling is in a *.class ?
    please help (i've been working around for days now)
    my work enviroment is
    eclipse (project set to utf-8 encoding)
    wsas 5.0
    jdk 1.4
    thank you for your time
    and nice day to you all!!
    gREEtings from malaga (spain)

  • Hot Sync with Non-latin Character Display Problem

    I have a XP Home Desktop with Palm Desktop 4.01 installed. When I do a hot sync with my Sony Clie T655C, the chinese characters are display correctly in both XP home Desktop and the Clie.
    Now, I have a netbook with window7 Starter installed for travelling use. It took me a while to resolve the problem on the hotsync with window 7 starter and sony clie. At the end, I have Palm desktop v6.2 and Palmhotsyncsetup from pimlico on the netbook. I am able to do a hotsync with cradle/cable, but not through network (with TCP/IP not listen error message).
    I have installed the chinese, English, french IME for the window 7 Starter netbook. I am able to type Chinese character in Notepad and Word and display the character correctly. I am able to save the file ( filename in both chinese and english character), re-open it and all characters are displayed correctly.
    But with Palm Desktop v6.2, I am able to type chinese and the characters are displayed correctly in calendar/data book. When I close the palm desktop and re-open it again. All the characters become "?", as a result, I can not fully evaluate the software Pimlico for window desktop. As it only works with Palm desktop v6.2.
    Any suggestion?
    Post relates to: Palm TX

    I have a XP Home Desktop with Palm Desktop 4.01 installed. When I do a hot sync with my Sony Clie T655C, the chinese characters are display correctly in both XP home Desktop and the Clie.
    Now, I have a netbook with window7 Starter installed for travelling use. It took me a while to resolve the problem on the hotsync with window 7 starter and sony clie. At the end, I have Palm desktop v6.2 and Palmhotsyncsetup from pimlico on the netbook. I am able to do a hotsync with cradle/cable, but not through network (with TCP/IP not listen error message).
    I have installed the chinese, English, french IME for the window 7 Starter netbook. I am able to type Chinese character in Notepad and Word and display the character correctly. I am able to save the file ( filename in both chinese and english character), re-open it and all characters are displayed correctly.
    But with Palm Desktop v6.2, I am able to type chinese and the characters are displayed correctly in calendar/data book. When I close the palm desktop and re-open it again. All the characters become "?", as a result, I can not fully evaluate the software Pimlico for window desktop. As it only works with Palm desktop v6.2.
    Any suggestion?
    Post relates to: Palm TX

  • Migrating welogic 6.1 to 8.1 international character display problem

    Hi,
              I am migrating application from weblogic 6.1 to weblogic 8.1 sp1 , my problem is character like french, spanish and german are not displaying properly. i have tried following:
              1.<%@ page contentType="text/html; charset=UTF8" pageEncoding="UTF8"%> in all the pages.(not working)
              2. i have removed above setting from all pages which are included as static (still not working)
              3. in weblogic.xml I defined<jsp-param>
                        <param-name>encoding</param-name>
                        <param-value>UTF-8</param-value>
                        </jsp-param>
                        <jsp-param>
                        <param-name>compilerSupportsEncoding</param-name>
                             <param-value>false</param-value>
                        </jsp-param>
              with all permutation and combination.(not working)
              I am getting some of characters garbled.
              any solutions
              

    In 6.1 how did the page look? i.e what encoding did it have? ISO-8859-1 should've fit all the langs you've mentioned unless I've missed something.
              -- Nagesh

  • Vetnam character display problem

    Dear All,
    I have created database in vetnam. but i am facing problem of displaying veitnam characters are displaying like ??????.
    i have created database with veitnam caharacterset VN8MSWIN1258
    we are using client server application server application (oracle 6i)
    i mad change the registery on client pc NLS_LANG=VIETNAMESE_VIETNAM.VN8MSWIN1258
    but still veitnami character are not displaying corectly .
    we have installed veitnam language in operating system of client.
    please guide me if i am doing mistake .
    thanks in advance.
    sher

    Hi,
    operating system version is windows server 2003 standard x64 Edition.
    database version and characterset are as below
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Release 10.2.0.4.0 - 64bit Production
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    SQL> SELECT *
    2 FROM v$nls_parameters
    3 WHERE parameter LIKE '%CHARACTERSET%';
    PARAMETER
    VALUE
    NLS_CHARACTERSET
    VN8MSWIN1258
    NLS_NCHAR_CHARACTERSET
    AL16UTF16
    SQL> SELECT userenv ('language') from dual;
    USERENV('LANGUAGE')
    AMERICAN_AMERICA.VN8MSWIN1258
    SQL>
    thanks,
    sher

  • Jython character display problem

    Hi,
    I am having problem with displaying character *¨* which is chr(168) or hex A8
    when i try ;
    s=chr(168)
    print sit gives me *¿* which should be *¨*
    It seems that jython is not supporting extended ascii characters
    when i try the above in python it works perfect.
    are there any solution to resolve this issue
    Thanks ..
    Edited by: Aang on 04-Nov-2009 10:06

    First of all thanks for your suggestion,
    I have already tried that.
    when i ord("mychar") i get the number 65533 which is vierd
    i, have also tried to print all the characters to a file starting from 0
    with
    for i in range(0,400) :
    fd.write(str(i) + " : " + chr(i))
    in the file it seems all the characters after 127 seems ?
    i think jython in my installation is lacking something
    Kind Regards

  • Character display problem on Podcast page

    None of the characters are displaying correctly when I go to the Podcast homepage thru ITunes.
    I get a bunch of '|'s instead. I looked at my language settings and it is set correctly to "English". What could be the problem?
      Windows XP  

    It sounds like you are in an Enterprise Business Suite (EBS) environment. I would suggest you post your question in that forum. More than likely, you are dealing with an issue/bug in the "Folder libraries" and you'll find faster help there.
    This forum deals with non-EBS forms development.
    Craig...

  • Please help website display problems

    Hi, Just purchased my mrs a curve 8520 with/thro Virgin. 
    Email, facebook/wifi all working but when browsing certain sites I have issues with display.
    For instance I use the browser and select sites from bookmarks (sites I have added) and these load fine, when I click link on sites it works but  the display will sometimes go black or displays incorrectly (can only see left side and unable to scroll to right etc). I refresh and it will get onto page but again it will go black and not display (sometimes I get security message to say not trusted certificate and I click on continue). To me (not too experienced with blackberry's though) it seems like a display issue with the blackberry.
    Is the display issue due to the sites?
    Can the blackberry only display certain sites due to site resolution?
    Is the black screen due to a memory issue (i.e.. Need more memory to display correctly)?
    Should I not use the blackberry browser and use the firefox or IE browser (have tried these too though and not worked but maybe I need to alter settings)?
    Or do I need to do something to the blackberry settings?
    I have tried a number of approaches to ensure ALL sites work correctly (mrs needs to use for work and needs to be able to access certain sites which Is why I got this phone). I would really appreciate some advice from an experienced Blackberry user,
    If you need additional info pls let me know, thanking you in advance for any help :-)

    olutomilola wrote:
    Pls how can  download adobe reader fO̶̷̩̥̊͡Я my phone
    If Adobe has released Reader for BB, you would find it at Adobe. But, honestly, I do not think that they have...they have for the PlayBook, but not for BB SmartPhones.
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Greek Character Display Problem

    Hi
    Server Side : We are using Oracle 8i . Database Character Set = UTF8.
    Client Side: Windows XP. Modified Control Panel->Regional Settings -> Advanced->Language for non-unicode program = Greek.
    Changed Alter session set NLS_Language = GREEK
    When we opened the oracle connection in our VB application.
    From our Visual Basic application
    Now I am able to input greek chars, Retrieve it back and displayed correctly.
    But When we copy a particular string and paste it in a field, one particular
    character is always showing as ?. As we don't have a greek keyboard, I don't
    know what combination of keys to press to key-in that particular character.
    This is the Word I have copied from Editor and pasted it in the VB field.
    &#927;&#957;&#959;µ&#945; &#949;&#960;&#953;ß&#940;&#964;&#951; .
    Except the Character which looks like B, all other greek characters are getting displayed properly and inserted correctly in the database. Only that particular letter is displayed as ? (question mark)
    Any idea what is wrong !!.
    Thanks in advance.
    Regards
    Murali

    Check this out.
    http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm

Maybe you are looking for

  • Connecting to SQLserver 2005 via Web Analysis using a JDBC driver

    We are currently working on a web analysis suite and have been trying to create a SQL spreadsheet data object. After downloading and supposedly installing the sqljdbc.jar driver, we are having problems getting a connection to MS SQL server 2005. We s

  • How to write a  PDF in a PS plugin?

    Hi all, how can I save a picture in PDF in a PS filter plugin?? Felix

  • ANN: XML Parser for C - Version 1.0.1

    Oracle announces the release of version 1.0.1 of the XML Parser for C now available for free download on the Oracle Technology Network. This version is compliant for the XML 1.0 and Namespaces 1.0 W3C Recommendations. Versions are available for Solar

  • Tray Extender came out

    I have the HP Officejet Pro 8600 Plus and the tray extender came completely out. I cannot get it to go back in and cannot find any resources online.  Please help!  Thanks in advance. 

  • HTTPService - using FlashVars for URL?

    Hi, New Flex user, so please forgive me if this sounds stupid. I'm fiddling around with a modified version of the dashboard sample application, and am using the FlashVars param tag to pass in a bunch of variables into the application. They all work f