Can Not Display Normal Chinese Chars in JSP

Hi,
I am displaying some chinese chars in a normal JSP file but it show me some
funny things. If I get the data from the oracle and the information is chinese,
then it display correctly. And I try another thing that I save the noraml JSP
(without any java code) to a html and it is working fine. Same content, if saved
as HTML, then ok. If saved as JSP, then got problem. I am using weblogic 6.1.
There are somewhere need to be configure or... Any idea for this? Thank you
very much!
yang lin

Hi Howard,
if i use Font.createFont() to general font object that
can solve chinese display problem in RH 7.3. but i
thought, it's no reasonable way to use font object.
that is really bad for cross-platform benefit or you
need to carry font file with your application.
have a way to set default font use createFont()
object?In the past, I've carried the font file around with me. Given the number of graphics files, properties files and
other assorted garbage that apps are already carrying around, it's not too unreasonable to have to add a
TrueType font to the list of hangers-on (unless it's the size of Arial Unicode MS - 23Mb is a big ask sometimes)!
Given that TrueType fonts themselves are essentially platform-independent, I don't see it as too much of an issue. But that's just me and my experiences! ;-)
To set the font as default...
try {
    FileInputStream fis = new FileInputStream("myFont.ttf");
    Font defaultFont = Font.createFont(Font.TRUETYPE_FONT, fis);
    setFont(defaultFont);
} catch (FontFormatException ffe) {
    System.err.println("My TrueType font is corrupted.");
} catch (IOException ioe) {
    System.err.println("My I/O stuffed up.");
}There are various ways to set the font in even better ways, particularly if you're in a standalone app, but the above is at least a good basic one.
Hope that helps,
Martin Hughes

Similar Messages

  • Date can not display correctly in excel from .jsp

    Hi,
    I create a .jsp report to export the data to excel. the report run OK, except the date field can not display correctly.
    for example in database :start date ='01-oct-2003'
    in the except it displays to 02/06/02.
    It seem all the date field can not be control in the report, and control by somthing else
    Doese anyone come accross this problem?
    Thanks

    Hi Rong,
    Are you using the following demonstration to build your JSP?
    http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
    (Output to Excel with Oracle9i Report)
    I tried to do the same, and inserted a database date field in the JSP using Reports. I found the following:
    While making the template inside Excel, if I make sure that the format of the date cells is "Date" - some particular date format, the date field values from Reports does not get exported correctly.
    However, if you make sure that inside the template, the format of the date cells is not date, but "General", then the date field values are correctly exported to Excel.
    Pl try it and let us know.
    Navneet.

  • Can't display *proper* Chinese char in v3.0.04 connecting to MySQL

    Hello to all guru,
    I am having some trouble on displaying Chinese characters on SQLDeveloper connecting MySQL database...
    Database: MySQL 5.5.17, for Win32 (x86)
    SQLDeveloper: 3.0.04
    JDBC: Connector/J 5.1.18 from MySQL
    Connection has no problem, retrieving data also great.
    Using mysql.exe at Windows Command Prompt, it could display the proper Chinese characters perfectly...
    mysql> SHOW VARIABLES LIKE 'character_set_system';
    -----------------------------+
    | Variable_name | Value |
    -----------------------------+
    | character_set_system | utf8 |
    -----------------------------+
    1 row in set (0.09 sec)
    mysql> select display_name, display_name_chi
    -> from contact
    -> where display_name = 'David Chan';
    --------------------------------+
    | display_name | display_name_chi |
    --------------------------------+
    | David Chan | 陳大衛 |
    --------------------------------+
    1 row in set (0.00 sec)
    Run the same select query on SQLDeveloper, it shows...
    display_name     display_name_chi
    David Chan     ³¯¤j½Ã
    On SQLDeveloper, Tools > Preferences > Database > NLS, there seems to have some NLS settings to play with, and default settings are:
    Language: AMERICAN
    Territory: AMERICA
    Tried changing to the followings...
    Language: TRADITIONAL CHINESE
    Territory: TAIWAN
    Still displaying the monster characters... I haven't tested to see if SQLDeveloper would behave the same while connecting to Oracle Database, and I am thinking maybe just the Java GUI's issue?!
    Can anyone give me some idea?

    Hi,
    Here is a post that provides a solution for a similar Chinese language situation related to the Oracle JDBC driver:
    Re: Can't select using special characters (symbols)
    Perhaps you will be able to find something equivalent for the MySQL driver.
    Regards,
    Gary
    SQL Developer Team

  • Strange scenario,Oracle can not display the data in mysql correctly

    I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
    -------mysql------------
    mysql> create table tst(id int,name varchar(10));
    Query OK, 0 rows affected (0.00 sec)
    mysql> insert into tst values(1,'a');
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from tst;
    ------------+
    | id | name |
    ------------+
    | 1 | a |
    ------------+
    1 row in set (0.00 sec)
    mysql> show create table tst\G
    *************************** 1. row ***************************
    Table: tst
    Create Table: CREATE TABLE `tst` (
    `id` int(11) DEFAULT NULL,
    `name` varchar(10) DEFAULT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    -------------oracle ------------------
    SQL> select count(*) from "tst"@mysql;
    COUNT(*)
    49
    SQL> select * from "tst"@mysql;
    id
    1
    SQL> desc "tst"@mysql;
    Name Null? Type
    id NUMBER(10)

    You can make the following query on the result page:
    "select * from the_table where movietitle = ? and cinema = ?"
    then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
    Below is the sample code, it assumes you have a connection to the database:
    PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
    stat.setString(1, usersMovieTitleSelection);
    stat.setString(2, usersCinemaSelection);
    ResultSet res = stat.executeQuery();
    if (res.next()) {
    out.print("The movie is available");
    } else {
    out.print("The movie is not available");
    }Now just add that to your JSP page. Enjoy ! =)

  • Email text not displaying normally / links within email not functionin​g

    All of a sudden, emails are not displaying normally; symbols and numbers are interspersed within words of emails, no graphics, no functioning links within emails on my BlackBerry Curve 8530.  Verizon Wireless suggested I upgrade to a different phone.  That's helpful.

    Have you sent HTML emails to GMAIL, HOTMAIL and YAHOO accounts successfully before? Are those services capable of handling HTML formatted email? Not all email clients can handle that type of email.
    OT

  • SuperFrench is found but this font can not display any text

    "SuperFrench" font comes from Autodesk. this fonts's real file name is supef__.ttf
    If it is placed in C:\Windows\Fonts folder then it is available for Windows native apps such as MS Excel.
    Java GraphicsEnvironment finds "SuperFrench" font
    but this font can not display any text.
    This happens in both Java6(1.6.0_34) and Java7(1.7.0_06)
    try this
    import javax.swing.*;
    import java.awt.*;
    import java.util.*;
    public class FontTest01 {
      public static void main( String[] args ){
        FontTest01 app = new FontTest01();
        app.run();
      void run() {
        String fontName = "SuperFrench"; //** SuperFrench font
        GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        String[] existFontNames = ge.getAvailableFontFamilyNames(Locale.ENGLISH);
        boolean fontExists = false;
        for( int i=0 ; i<existFontNames.length ; i++ ){
          if( existFontNames.equals( fontName ) ){
    fontExists = true; break;
    if( fontExists==false ){
    System.out.println( fontName +" does not exist" );
    System.exit(-1);
    JLabel label = new JLabel( "ABCDEFG" );
    Font font = new Font( fontName, Font.PLAIN, 20 );
    System.out.println( font.getFontName() );
    label.setFont( font );
    JFrame f = new JFrame();
    f.add( label );
    f.setSize( 180, 120 );
    f.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    f.setVisible(true);
    Edited by: TadashiOhmura on 2012/06/17 23:04
    Edited by: TadashiOhmura on 2012/06/18 7:50                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Thank you for your replay.
    I face the same trouble with JavaFX
    I report this problem into Jira and filed as RT-22641
    Some members of Oracle developer team write comments for this issue.
    http://javafx-jira.kenai.com/browse/RT-22641
    This font has some irreguler structure.
    I hope Java font system will deal with it.

  • MenuBar can not display all menuitem

    Hello,everyone!
    There is a Menubar.
    The Menubar has 100 menuitems.
    Problem:Can not display all menuitems.
    Do MenuBar's SubMenu has Scroller?
    Sample:
    <mx:MenuBar id="myMenuBar" width="450" height="50" >
    <mx:dataProvider>
    <mx:XML>
    <menuitem label="menuitem 1"/>
    <menuitem label="menuitem 1"/>
    </mx:XML>
    </mx:dataProvider>
    </mx:MenuBar>
    <menuitem label="menuitem 1"/>
    Can not display all menuitems.

    you might want to use some flexlib components lib
    take a look at this :
    http://code.google.com/p/flexlib/wiki/ComponentList
    and specifically at this component :
    http://flexlib.googlecode.com/svn/trunk/examples/ScrollableMenus/ScrollableMenu_Sample.swf

  • Urgent: Graph can not display

    Hi,
    My report can not display graph correctly if I view the report from report server in html format, because the graph url use report server's hostname, not IP. If I use IP view the graph, there are no problem.
    So my problem is how to config the report server for the graph display correctly?
    I tried to modify the IMAGEURL in rwservlet.properties, it doesn't work.
    I tried to modify the hosts file in local maching to mapping the report server hostname and IP, the praph can display, but it's not a good idea for all user to config their client maching .
    Thanks in advance.
    report url:
    http://172.20.137.205:7777/reports/rwservlet?htportalconn&destype=cache&desformat=HTMLCSS&report=usage_report.rdf&p_conn_string=htportalconn&P_Bill_Period=200806&p_report_id=41
    graph url in report (can not display):
    http://hk8sp202:7777/reports/rwservlet/getfile/HW/YX+J7DBjNFKgUnojRyFXmKwm2qqSnwR277aMm/561014461.jpg
    if replace the hostname with IP in graph url, graph can display:
    http://172.20.137.205:7777/reports/rwservlet/getfile/HW/YX+J7DBjNFKgUnojRyFXmKwm2qqSnwR277aMm/561014461.jpg
    Sammy
    Edited by: Sammy Song on Sep 8, 2008 12:54 AM

    Hello Anek,
    Refer to SAP Note 704604 and 454042.
    Also,
    http://help.sap.com/saphelp_nw04/helpdata/en/76/41d43ab8029b66e10000000a114084/frameset.htm
    and
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4846ac90-0201-0010-099d-d3b4e271849c
    regards
    Atul Shrivastava
    PS:Award points for helpful answer.

  • The admin page can not displayed completely

    Dear all,
    i have install OracleXEUniv,
    the www login page displayed OK, i can login
    after that i run . for update in rel 3.0 .. ..
    @apexins myadminpassword SYSAUX SYSAUX TEMP /i/
    .. the sql ran finish ok
    but when i try access the address
    the login page displayed not OK, image can not displayed, when i enter username and password, and click login, there is massage 'Error in page'
    how to repair that ? is wrong in my step ?
    i used :
    IE Ver 7
    Os XP
    thanks for anwer

    Hi,
    Make sure you followed the post-installation tasks mentioned in the Installation Guide.
    On a Windows system, you can copy the apex\images directory using Windows Explorer or execute a command such as the following from a command prompt:
    xcopy /E /I htmldb\images ORACLE_BASE\ORACLE_HOME\Apache\Apache\images
    On UNIX or Linux based systems, you can copy the apex/images directory by executing a command such as the following:
    cp -rf htmldb/images ORACLE_BASE/ORACLE_HOME/Apache/Apache
    Make sure that you have /i/ defined in one file (httpd.conf, marvel.conf OR dads.conf)
    -Priyanka

  • It can not displayed sap script

    i have to post invoice in vendor a/c,then run to APP successfully,then execute  spool,actually hear it can displayed ABAP list file, SAP script(otf) file,and SAP script file(otf) but hear only displayed ABAP list file, SAP script(otf) file it can not displayed vendor payment advice list why. pls give me answer

    Hi Shirley,
    I assume the hardware is less on the target than on the source or they are different at least in terms of hardware specs
    If the system is not starting, check the dev_disp.log, the stderr* files, and the dev_w0 log from the work directory to find the exact error. Does the system start if you increase or decrease this value?
    Regards,
    Paul

  • While Installing this error is coming This Program can not display the pag

    When I Try to Install SAP B1 8.8 on Win server 2008.
    I am receiving this message.
    This Program can not display the page
    The website is encountering Problem
    There might be a typing error in the address
    At the time of Installation which site we need to access.
    My Internet is working.
    Still i am facing this Problem please suggest me what should I do.

    HI Ram ,
    Internet is not required while Installation .
    Go through :
    Re: SAP Business Installation
    Thanks
    Ashish

  • IE can not can not display the website

    start -> all Programs -> oracle Home -> Database Control - ORCL
    when I click on ORCL  to open the GUI
    i am getting a internet error http:/localhost:1158/em
    IE can not can not display the web site How can I get the GUI to open
    Please advise

    In version 4.2 on the controller SSLv2 is disabled by default. IE by default doesn't do SSLv3. Either enable SSLv2 on the controller or SSLv3 on the client.

  • Why teststand can not display the ASCII character which number up to 128?

    Hello All,
            I have encountered a problem on an application for ASCII character,why teststand can not display the ASCII character which number up to 128?
           For example:an expression  Local.xx=Chr(164),
           xx-->string,I can not get the correct string.
           Have any idea for this?
    OS:WinXP,Teststand2012 SP1.
           Thanks a lot.
    Solved!
    Go to Solution.

    dug9000 wrote:
    [...]On Windows 7 at least, the code page setting for the operating system is located in the "Region and Language" control panel in the "Administrative" tab where it says "Language for non-Unicode programs".
    Hope this helps,
    -Doug
    Ah, that explains why i see "European Set"....
    One question, Doug: Obviously, you can select only the localization there. Is this PostScript Characters for all languages? Or is it possible to switch to something like true types, e.g. "Wingdings"? (I know, bad example, but i hope you get the point)
    thanks,
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Layout - This Program can not display the webpage

    Hi Experts,
    I am trying to create adobe forms in Webdynpro ABAP, for that I created a Webdynpro component and then view in it and created the required attributes and nodes and the pdfsource as xstring type.
    When I go to Layout tab it showing "This Program can not display the webpage" and in route element container I created an element and gave as of Interactive forms but the system is not creating any interface nor going into adobe live cycle designer.
    Is it the problem with the Live Cycle Designer or what exactly I have to do now.
    Please help me out.
    Thanks,
    Praveen

    Hi.,
    This seems that u didnt maintained host entries.,
    Click Run -> enter drivers -> goto etc folder -> double click on hosts file -> open with note pad.
    there u need to enter the host entries., like .. 192.....<server_address> <tab> <domain> <tab> <host>
    ask ur basis team., they will configure that..,
    hope this helps u.,
    reply if u need some more clarifications.,
    Thanks & Regards
    Kiran

  • JEditorPane can not display the applet contained in a html

    We know that class JEditorPane can be used to display Html pages. but it has limitation. When a Html page contains Applet, it can not display the applet! Does anyone know if there's any solution for this problem?

    Hi, i do the 'CREATE_TEXT', after the PO created,   the PO created correctly except the Long Text.
    THE CODE:
    *********************1*********************
        CALL FUNCTION 'BAPI_PRODORD_CREATE'
          EXPORTING
            orderdata    = wa_po
          IMPORTING
            return       = rt
            order_number = aufnr
            order_type   = otype.
    Then i got a AUFNR,
    **********************2**********************
    CONCATENATE sy-mandt aufnr INTO t_name.
          CALL FUNCTION 'CREATE_TEXT'
            EXPORTING
              fid         = 'KOPF'
              flanguage   = 'E'
              fname       = t_name
              fobject     = 'AUFK'
              save_direct = 'X'
              fformat     = '*'
            TABLES
              flines      = it_text
            EXCEPTIONS
              no_init     = 1
              no_save     = 2
              OTHERS      = 3.
    and SY-SUBRC is 0.
    the long text also generated, but can not displayed on the CO03

Maybe you are looking for

  • Reconciliation of data in R/3 and BI

    Dear Guru, I am new to BI enviroanment.How to reconcile the data in R/3 and BI?Can any one help on this.

  • Customize Sourcing Cockpit  in SRM 5.0

    Hi experts, i'd like to know how is possible to customize in SRM 5.0 (back Ecc6.0, Classic Scenario) the Buyer' Sourcing Cockpit. Is there a particular workflow? Is the operational purchaser the right role? Thanks Regards

  • Livecycle button with an action bypassed if 'enable additional featues' actioned

    I have created a form in Livecycle that has a button with an action that when clicked repeats several rows of a table.  (ie if someone needs to see more rows they click the button) This works fine in the Preview PDF and works fine once saved  if I th

  • 2.0 upgrade/operation woes

    I installed the 2.0 upgrade to my 16 GB Touch last night, but not without difficulty and continuing problems. The attempted backup did not work, as some have noted. (My particular issue was an error -43.) I finally gave up and let it upgrade anyway,

  • How to unlock

    please tell me me how to unlock the iphone 3g?