Display different charset in JEditorPane

Hi Gurus,
I am able to display diferent charset in in JTextArea and even in JEditorPane if I display it as a Plain Text. But when I am dispalying the Japanese charecters as a HTML, its simply dispalys the boxes instead of the Japanes chars. I don't know whether its a known issue in JEditorPane but didin't find anything in the Bug Parade. I'll be gratefull for anybody giving the workaround for this.
FYI... following are the steps to reproduce the issue,
1. Create a HTML file with Japanese characters.
2. Make sure your window system has installed Japanaes font and selected in the Regional settings.
3. Now, read the file using a stream by specifying the SHIFT-JIS encoding type and send the output to the editor pane using setText() method. Also specify the content type before setting the text as "html/text; SHIFT-JIS".
Thanks & Regards,
Siva

Hey,
Just check the font name set in the HTML file...:-)
try setting the FACE to Dialog,MS GOTHIC OR MS Mincho TO FIX THE SAME,
i think this should work ,
Cheers,

Similar Messages

  • How to display Xml in a JEditorPane(in an applet)

    Hi All,
    I have an applet and i want to display xml in a JEditorPane in an applet. This xml document has a xsl attached to it for transformation. How can i do the transformation??
    Help or sample code or link to a sample code is highly appreciated!!!!
    Thanks
    Ragu

    Look this servlet which does a transformation. JEditorPane could call this servlet (with the method setPage) to do the transformation:
    public class SampleXSLTServlet extends javax.servlet.http.HttpServlet {
    public final static String FS = System.getProperty("file.separator");
    // Respond to HTTP GET requests from browsers.
    public void doGet (javax.servlet.http.HttpServletRequest request,
    javax.servlet.http.HttpServletResponse response)
    throws javax.servlet.ServletException, java.io.IOException
    // Set content type for HTML.
    response.setContentType("text/html; charset=UTF-8");
    // Output goes to the response PrintWriter.
    java.io.PrintWriter out = response.getWriter());
    try
    javax.xml.transform.TransformerFactory tFactory =
    javax.xml.transform.TransformerFactory.newInstance();
    //get the real path for xml and xsl files.
    String ctx = getServletContext().getRealPath("") + FS;
    // Get the XML input document and the stylesheet, both in the servlet
    // engine document directory.
    javax.xml.transform.Source xmlSource =
    new javax.xml.transform.stream.StreamSource
    (new java.net.URL("file", "", ctx+"foo.xml").openStream());
    javax.xml.transform.Source xslSource =
    new javax.xml.transform.stream.StreamSource
    (new java.net.URL("file", "", ctx+"foo.xsl").openStream());
    // Generate the transformer.
    javax.xml.transform.Transformer transformer =
    tFactory.newTransformer(xslSource);
    // Perform the transformation, sending the output to the response.
    transformer.transform(xmlSource,
    new javax.xml.transform.stream.StreamResult(out));
    // If an Exception occurs, return the error to the client.
    catch (Exception e)
    out.write(e.getMessage());
    e.printStackTrace(out);
    // Close the PrintWriter.
    out.close();

  • Illustrator CS4 and my drop down menu displaying different typefaces is no longer displaying font preview.

    I am using Illustrator CS4 and my drop down menu displaying different typefaces is no longer showing all of them, just blank spaces where they would be...that is unless I put my cursor over it and I can then see the typeface. This is more of a nuisance than anything and didn't happen until I updates OS X to Yosemite. I currently am operating OS X  Yosemetie 10.10.2
    I have attached a screen shot. You can see that the font highlighted as the cursor is over it I can see the preview...but one I move the cursor it appears like all the others in the list and is blank.
    HELP!

    Solved using this previous users had the same issue; Font previews not appearing correctly in the character window after upgrading to Yosemite

  • Fost Displaying Differently in Different Browsers on Same Computer

    Why would a font display differently on the web page depending on the browser? If the font is installed on the computer (a Mac), isn't it available to all browsers?
    The specific problem I am having is with Palatino shadow. (The shadow is important, as it increases the contrast of the text against the image background.) The shadow shows up in Safari but not in Firefox.
    Why would this be?

    Firefox doesn't do shadows in the current version.

  • How to display different icon within WDA alv table base on row data ?

    Hi,
    is that possible to display different icon for every row within ALV table depending on the row data ?
    for instance if the status 'S' display ~Icon/SuccessMessage and 'E' display ~Icon/ErrorMessage ?
    because base on this code below i only can set 1 icon for the whole row data.
    LOOP AT lt_columns ASSIGNING <fs_column>.
        CASE <fs_column>-id.
          WHEN 'ICO'.
            CREATE OBJECT lr_caption.
               lr_caption->set_image_source( value = '~Icon/SuccessMessage').
               <fs_column>-r_column->set_cell_editor( lr_caption ).
        ENDCASE.
      ENDLOOP.
    Thank you in advance.
    Fernand

    Hello,
    Yes it is possible to display different images based on data.
    For that what you can do is create one attribute 'STATUS' of type string in context node which you are mapping to ALV.
    And fill that attribute with the path to image based on your requirement like for status 'S' set the attribute to ~Icon/SuccessMessage and if status is 'E', set it to ~Icon/ErrorMessage at runtime.
    Now in the settings for ALV use the following code:
    * Display icon in column seatsocc
      DATA: lr_column TYPE REF TO cl_salv_wd_column,
            lr_image TYPE REF TO cl_salv_wd_uie_image,
            lv_icon TYPE string.
      lr_column = lv_model->if_salv_wd_column_settings~get_column( 'SEATSOCC' ).
      CREATE OBJECT lr_image.
      lr_image->SET_SOURCE_FIELDNAME( 'STATUS' ).
      lr_column->set_cell_editor( lr_image ).
    in the above code, column 'SEATSOCC' will be displayed as an icon.
    Sample code to fill the attribute 'STATUS'
    LOOP AT lt_flights INTO ls_flight.
        lv_seatsfree = ls_flight-seatsmax - ls_flight-seatsocc.
        IF lv_seatsfree = 0.
          ls_flight-status = 'ICON_RED_LIGHT'.
        ELSEIF lv_seatsfree <= 50.
          ls_flight-status = 'ICON_YELLOW_LIGHT'.
        ELSE.
          ls_flight-status = 'ICON_GREEN_LIGHT'.
        ENDIF.
        MODIFY lt_flights FROM ls_flight.
      ENDLOOP.
    Hope this helps!
    Regards,
    Srilatha
    Edited by: Srilatha M on Jun 25, 2010 12:02 PM

  • How to display different Time Statement forms in ITS service PZ04

    Hi all,
    I am working on a underlyinge R/3 4.7 system and are working with standalone ITS and ESS 50.4. I am posting this question to find out if any of you has experience with my problem.
    The business wishes to use the ITS transation PZ04 standard and wish to be able to display different Time Statement forms in the transaction through customized variants for the report(RPTEDT00) that the PZ04 transaction executes. In the IMG it is posted that one variant has to be created called HRESS_TEDT00 and this works, but restricts the PZ04 transaction to always be called with this variant and therebye the same Time Statement form every time.
    I then by debugging found that the underlying ABAP code processed from SAP standard has a variable VARIANT that is hardcode to = HRESS_TEDT00.
    The question is: Is there anyway to setup the PZ04 transaction so that it can be dynamic decided which variant should be used, f.ex. from persons subarea from infotype 0001?
    Looking forward to here if anybody can help.
    Regards,
    Allan Brauer

    hi allan,
    cud u plz help me how to sort out this problem actually in mu company the same scenario is here need to be display pe51 form instead of standard hrforms.....
    plz help me how will i replace this "hrforms with pe51"..

  • PDFs display differently in Internet Explorer 9 versus FireFox

    We use Adobe Reader X in all cases (10.4.1)
    On old computer, we have a website we go to using Internet Explorer (version 8.x on XP) where we ope/save & print to a PDF file. The information on the PDF prints vaules in a certain order - for example:   A,B, C    --works great--this is what we want it to do.
    We buy a new computer, Windows 7 with IE9, and the PDF displays with the same values in this order:  C,B, A  -   not good, do not want that.
    We try FireFox on the new computer  -- works great --just like it did on the old computer.
    What setting in IE9 is causing this PDF to display differently than in FireFox (or IE8)?
    UPDATE:  We did load IE8 on Windows 7 (by uninstalling IE9) and the PDF works fine --so it's not just something unique to FireFox. IE9 is displaying information in this PDF differently--why?

    Add/update these params in your web.xml and redeploy so the style class names are not optimized and client debugging is easier.
    <context-param>
        <param-name>org.apache.myfaces.trinidad.DEBUG_JAVASCRIPT</param-name>
        <param-value>true</param-value>
      </context-param>
      <context-param>
        <param-name>org.apache.myfaces.trinidad.DISABLE_CONTENT_COMPRESSION</param-name>
        <param-value>true</param-value>
      </context-param>

  • How to make a form dynamic so that it displays different logos at runtime

    I am working on some assignment wherein I would like to make a form dynamic so that in it's designated image holder it displays different logos/pictures at run time? First of all is there such a possibility?? I am still very new to this forum and also trying to understand the logic/bindings/heirarchy etc. in LCD. Any input would be highly appreciated.
    Thanks in advance

    LC 7 or 8 does not help load logs at runtime. However you can associate all your logs at design time and control their visibility property based on the events. This may help fulfill the requirements you have to an extent however adding number of images at design time will increase the size of the template.

  • Insertion a record in a table having columns of different charsets using OLEDB

    My development environment -
    Database -> Microsoft SQL Server
    2008 R2
    OS -> Windows Server
    2008 R2
    Database Charset -> Chinese_PRC_CI_AS (Windows
    936)
    Operating System Charset -> Chinese
    Below table is having varchar fields with different charsets.
    create
    table dbo.tcolcs1 (
        c1 int
    not
    null
    primary
    key,
        c2 varchar(30)
    collate SQL_Latin1_General_Cp1_CI_AS ,
        c3 varchar(30)
    collate Chinese_PRC_CI_AS
    I want to insert below record using OLEDB APIs provided by Microsoft. Just for information, character '0x00C4' does not
    belong to Windows 936 codepage.
    insert
    into dbo.tcolcs1
    values (10,
    NCHAR(0x00C4), NCHAR(0x4EBC))
    Code snippet -
    DBPARAMBINDINFO bind_info
    memset(&bind_info,
    0, sizeof(DBPARAMBINDINFO));
    bind_info.pwszDataSourceType = L"DBTYPE_VARCHAR";
    bind_info.wType = DBTYPE_STR;
    I have bound the varchar field with DBTYPE_STR. I can see that my code is not inserting Latin1 character (0x00C4) correctly
    into the table. The code always inserts a blank character into Latin1 column (c2) and 0x4EBC into Chinese column (c3).
    Later, I changed the binding from DBTYPE_STR to DBTYPE_BYTES as below -
    bind_info.pwszDataSourceType = L"DBTYPE_BINARY";
    bind_info.ulParamSize =
    0;              
    bind_info.wType = DBTYPE_BYTES;
    With the above change, I observed that OLEDB is converting hex value to string. It is inserting 0x00C4 as 'C4' and 0x4EBC
    as '4EBC'. I also tried with adding 'AutoTranslate=no' in driver connection string, but it did not help. How can I insert above record with OLEDB in the above table ?
    Thanks in advance.

    Did you try making fields as unicode?
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • PDF file displays different number of text blocks in Acrobat Pro CC 2014 and CS6 versions

    Hi,
    I've inherited a file at work that displays different numbers of text blocks, depending on the version of Acrobat Pro used to view the file. Here's the specific issue:
    As viewed in CC 2014:
    "Chapter 1 - Chapter One Title": Appears as two text blocks -- one for "Chapter 1 - " and one for "Chapter One Title"
    As viewed in CS 6:
    "Chapter 1 - Chapter One Title": Appears as a single text block -- "Chapter 1 - Chapter One Title"
    This occurs only with regard to single-digit chapter numbers that are whole numbers. So:
    Chapter 1, Chapter 5, and Chapter 7 entries appear as two blocks in CC 2014, one block in CS6.
    Chapter 2.0, Chapter 6.1, Chapter 10, entries appear in single blocks in both CC 2014 and CS6.
    The PDF file was created -- I believe -- through the save-to-PDF feature in Word 2010.
    Any idea what's happening here?
    Thanks.
    David

    First of all, there is no such thing as Acrobat CS6 or Acrobat CC 2014. We assume you are referring to Acrobat X and Acrobat XI respectively.
    Secondly, how are you determining how many text blocks are in the PDF file? By use of the text touchup/edit function in Acrobat? If so, how this edit function displays text doesn't necessarily correspond to the actually underlying text fragments in the PDF file. In fact, sometimes it combines fragments based on heuristics. Those heuristics have varied with different version of Acrobat.
    PDF as a file format doesn't know the context of the graphical objects such as text. There is no concept of a line, a sentence, a paragraph, a column, etc. in terms of text. Runs of text are context-insensitive. You will get “breaks” when switching between regular and italics or when unusual paragraph justification is involved.
    Is the actual problem in trying to edit the text or something else?
    If you post a file, and indicate what text we should look at, we can confirm what is actually going on in your file.
              - Dov

  • Displaying different levels of the same hierarchy in the different columns

    I have a parent child hierarchy and wish to display different levels of the hierarchy in different columns of the resultset eg
    level 1 level 2
    Europe UK
    Europe France
    N America US
    N America Canada
    However writing MDX like the below
    select
    {} on 0,
    ([Geo].[level 1],[Geo].Level 2] on 1
    from cube
    results in the error "The [Geo] hierarchy is used more than once in the crossjoin
    How can I get around this??

    Hi,
    You can make use of CrossJoin function in MDX, I give a sample MDX based on the AdventureWorks database:
    select {[Measures].[Reseller Sales Amount]} on 0,
    crossjoin({[Sales Territory].[Sales Territory Group].[Sales Territory Group].members},{[Sales Territory].[Sales Territory Country].[Sales Territory Country].members}) on 1
    from [Adventure Works]
    After execut the MDX you will get the result like this:
    Reseller Sales Amount
    Europe
    France
    $4,607,537.94
    Europe
    Germany
    $1,983,988.04
    Europe
    United Kingdom
    $4,279,008.83
    NA
    NA
    (null)
    North America
    Canada
    $14,377,925.60
    North America
    United States
    $53,607,801.21
    Pacific
    Australia
    $1,594,335.38
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • I have just intalled PSElements 12 on a new PC with windows 8.1. It installed ok but when I open it up it displays different than on my windows 7 PC. The buttons and text are tiny and almosy impossible to see even when I drag it to full screen. How do I a

    I have just intalled PSElements 12 on a new PC with windows 8.1. It installed ok but when I open it up it displays different than on my windows 7 PC. The buttons and text are tiny and almosy impossible to see even when I drag it to full screen. How do I adjust it to look normal?

    Hi Paul ,
    It could be a compatibility issue as well as Acrobat 8 is an older version.
    Do you get any error message while registering for the product?
    Try repairing it and once and also check for updates as well.
    Is it happening with all the word files or any specific one'?
    Regards
    Sukrit Dhingra
    Acrobat 8 and Windows 7 Don't Work

  • Image layouts display differently in Safari than in Explorer

    I have noticed that web page images display differently in Safari than in Explorer on a PC. On a PC, the web page may display three images side by side. In Safari, I might get two images side by side and the theid image below. Is there any correction for this? Thanks.
    Norb

    #sidebar_1 a:vistied {
    color:#000;
    is stating that all visited links in the #sidebar_1 div to be black. Are you saying that all visited links are black, outside the sidebar_1 div?
    Jim

  • Imported swfs display different every time

    Hello -
    I have tried importing swfs, and each time it displays different when published. The first time, it resized and could be seen completely within the window. The second time, it did not resize so only the top left of the image could be seen. The third, time it sort of resized, but is still cut off on the bottom. I inserted the same swf file the same way each time, so I'm not sure what affects the way it displays when published. I'm using the trial version of Presenter version 7.0.7 Build 7746. The swfs were created in Captivate 5.0, and I'm using Office/PowerPoint 2010. Below are examples of what each looks like after the publish. Does anyone know how I can control how the swf will display once published?
    Thanks!
    Katherine

    Hello -
    I think it has to do with resizing the swf once it is imported. I resized it first by widening it so it went the entire width of the page - the second time I believe I did the same thing and got the larger image. Then I tried various ways of resizing and also not moving or resizing at all, and got these different results. It is not consistent, the same way of resizing did not result in the same output. Is it not possible to resize the imported swf - for example, resize so it takes up the entire slide? Below is a link to download the swf I'm using.
    http://mylearn.documentum.com/curriculumdevelopment/slide4.zip
    Thanks!
    Katherine

  • Displaying different patterns on a label

    Hi,
    I want to display different patterns on a label component , like label with mesh or lable with lines passing diagonally. Is there any way to draw these patterns on a label
    Thanks

    We dont want to draw
    anything on label. we just need to display different
    desings on labels
    ...and the way to display different designs on the label is to draw on it. However, you should not override the paint method, you should override the paintComponent method (assuming that you are using Swing rather than AWT, which seems to be a fair assumption since you are posting this in the Swing forum).
    Here is a very simple example of one way of doing this. See how the paintComponent method is overridden to draw horizontal lines on the label. Maybe this can give you some ideas.
    import java.awt.Graphics;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.SwingUtilities;
    public class HorizontalLinesLabel extends JLabel {
        private static int GRID_SPACE = 7;
        public HorizontalLinesLabel(String s) {
            super(s);
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            int h = getHeight();
            int w = getWidth();
            for( int y = GRID_SPACE; y < h; y += GRID_SPACE ) {
                g.drawLine(0, y, w, y);
    }

Maybe you are looking for

  • Keyboard and trackpad freeze

    Running OS X 10.5.8...my keyboard and trackpad suddenly and unexpectedly became inoperable. Plugging in a mouse regained pointability but still could not type. Rebooted several times until keyboard "came back". Immediately timemachined a backup. And

  • How to configure mail for att?

    I am trying to configure my new IMac apple mail program with an att mail account, please refer me with any link that works well. Many thanks

  • Editing video by half frames or less

    I'm and audio guy trying to edit video, so I'm not sure if I'm using the correct terms, but can you slide video in Final Cut Pro by less than a frame? e.g. a half frame or 1/4 frame, or even miliseconds? I know that in ProTools you can "nudge" audio

  • Discovering Network devices on 2 different subnets

    Hello I am trying to discover the network devices available in 2 different subnets (10.0.0.0) and (172.0.0.0), I installed 2 interface cards on the operations manager  management server, each interface should reach the network devices in their addres

  • Bank statment Print

    Hi, In FF_6 when i trying take a print of the Bank statement ,FIrstly when i fill all details and execute ,It is showing List contains no data , But data is there and secondly what are the print parameters should be maintained  to  print a Bank state