Chinese Internationalisation

I need to save Chinese Characters through java application to database.
USing Java InputMethod Framework i was able to type chinese in textarea.
I also changed database field type to nvarchar2 and tried saving.
The data got from the textfield or textarea using getText() method is in '????' format.And the data saved in database is in some other format.
When i retrievd the value from database, and tried to set text in text area,nothing was displayed. Is this not the right way to do?How should i solve the problem?

I belive chinese characters are especially unplesant to handle because there is more than 256 of them (correct me if I'm wrong). If I were you I would do following steps:
1. Make sure your OS has proper chinese support. You should be able to display chinese windows titles, switch keyboard to chinese and have chinese font. If you have JEdit then beeing able to type chinese text in it will be good proof. There is chinese keyboard isn't it?
2. Get well prooven unicode codes for text you try to put in database. It can be done by editing document in JEdit and saving it with Unicode (16 bit) encoding. You can the open it in hex viewer and get codes for text;
3. When you get data from JTextField dump it to System.out character by character converting each of them to number ie. System.out.print(((int)my_string.charAt(i)) & 0xffff). Verify if it matches known codes. If it does, then input to Java works ok. If not, you may need to change system locale or do something about what I don't know at all. I don't know the byte order in unicode files so there would be better to dump codes in hex;
4. If typed text does not show correctly in JTextField but it has proper codes then problem is with font. Maybe you don't have chinese font which matches font familly used by JTextField. Reading about how Swing displays fonts will help here;
5. Once you have your Unicode data you have to make sure that your database can store it. Contact with database supplier if it supports either Unicode16 or UTF-8 encodings. If it does not, you are it troubles. If database is not unicode then it will make attempts to convert your texts to known selected code page. What is "nvarchar2" ? . Note, transfers to database goes through JDBC which may also do some unwanted conversions.
6. Transfer your text to database and read it back. Check again codes of characters to eliminate displaying problems.
If all above steps will not allow you to isolate problem feel free to ask again.
P.S.
If you are not tied to specific database there is a http:://www.mckoi.com/database

Similar Messages

  • Cannot display certain french glyphs running in Chinese NT 4.0

    I have got a java application which supports english, french, german, spanish, italian languages. I have translations properties files which is loaded for the language the application is installed in(ResourceBundle, et al). I have a new requirement to allow the application to run the chinese, korean and other DBCS languages.
    The problem I face is when installing and running my application in french(or spanish).Some of the french glyphs are not getting correctly displayed in the menubar and pop up menu, while the same glyphs are displayed correctly in labels and buttons. By not getting correctly diaplyed, I mean that the particular glyph is not dispalyed at all(no garbage, rectangular boxes, etc). There are empty spaces within words. I have not done any changes to the font properties files, nor am I loading and setting fonts anywhere in the application. Also I am not setting the locale using Locale.setDefault. That means I am in the default os locale. Am I required to do some other settings to fix this problem? Below is the environment I am working in
    Os - Win NT
    Language - Traditional Chinese
    Application lang - French
    JRE 1.4.1_01
    Any help on this will be appreciated.

    Thanks for your reply.
    For point 1, I am working on a chinese NT, so the chinese fonts file MINGLIU.TTC is already installed.Also installed are the arial, courier, times,symbol and windings fonts as per the font.properties.zh file.
    For point 2, There is already a file(font.properties.zh) file in the jre\lib directory. Could you elaborate what changes should I make to the file?
    I have the internationalised version of jre 1.4.1_01 installed. The intriguing part is the french fonts are getting correctly displayed throughout the application correctly except for the menu items. There is no problem with displaying, entering chinese characters though.
    I did a small experiment and used the non internationalized JRE and surprisingly found all french characters to get correctly displayed throughout the appliacation!! The problem here came with displaying certain chinese characters. But the font properties files in both the jres(internatinalized and non internationalized) were similar.

  • Problem in chinese translation

    Hi All,
    I am working on chinese translations.  I am using IE 7.0, in which i hv selected language as Chinese (PRC) [zh-CN].  Even after deploying the text is still cummin in english.  Kindly provide some help in resolving this issue.
    Thanks & Regards
    Jaspreet Kaur

    Hi,
    in the language settings u have to remove the existing language which in ur case must be english then add chinese. and close the browser.and try logging again.
    and i hope u have created the application internationalisation in web dyn pro
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/internationalization%20of%20web%20dynpro%20applications.pdf
    Edited by: Nikhil Tapkir on Aug 25, 2008 1:33 PM

  • Chinese filename can't be properly processed

    I met a touchy problem, could anyone help me?
    I want to generate an attachement, which filename is of Chinese characters,
    in servlet using these codes:
    " response.setContentType("text/plain; charset=GBK");
    response.setLocale("zh_CN");
    response.setHeader("Content-disposition", "attachment;
    filename=\"=?GBK?B?1tDOxC5leGU=?=\"");
    ServletOutputStream sos = response.getOutputStream();
    sos.write("1234567", 0, 7);
    but when I download it in IE5, the filename is wrong. The application is
    running on iAS6. What should be a proper way?
    Thanks in advance.

    Did you enable internationalisation in iAS?
    seagull wrote:
    I met a touchy problem, could anyone help me?
    I want to generate an attachement, which filename is of Chinese characters,
    in servlet using these codes:
    " response.setContentType("text/plain; charset=GBK");
    response.setLocale("zh_CN");
    response.setHeader("Content-disposition", "attachment;
    filename=\"=?GBK?B?1tDOxC5leGU=?=\"");
    ServletOutputStream sos = response.getOutputStream();
    sos.write("1234567", 0, 7);
    but when I download it in IE5, the filename is wrong. The application is
    running on iAS6. What should be a proper way?
    Thanks in advance.--
    Consulting Project Engineer
    iPlanet Professional Services - ANZ
    iPlanet e-commerce Solutions
    - A Sun|Netscape Alliance
    Sun Microsystems Australia Pty Ltd

  • Window 8.1 Chinese character cannot display properly in a game even though I have downloaded and install all chinese language packs

    Hi,
    The operation system for my computer is Window 8.1. I am currently trying to install a chinese game. Even though I have downloaded and install all the chinese language pack, I have even set the regional language locale to chinese (similified / traditional),
    the chinese characters will not display properly in the game. Some people told me i need to set the locale to Chinese PRC, but I am not sure where to download this PRC language pack for window 8.1 (as I only have chinese simplified and chinese traditional).
    I would greatly appreciate if someone can give me a hand in solving this problem. Thank you for your help in advance. 

    Hi,
    The operation system for my computer is Window 8.1. I am currently trying to install a chinese game. Even though I have downloaded and install all the chinese language pack, I have even set the regional language locale to chinese (similified / traditional),
    the chinese characters will not display properly in the game. Some people told me i need to set the locale to Chinese PRC, but I am not sure where to download this PRC language pack for window 8.1 (as I only have chinese simplified and chinese traditional).
    I would greatly appreciate if someone can give me a hand in solving this problem. Thank you for your help in advance. 
    Hi,
    Please open Region, under administrative -> Language for non-Unicode programs: choose Chinese.
    Kate Li
    TechNet Community Support

  • How to upload chinese word in the R/3 with fileupload element?

    HI, experts,
    I am working with a File Upload Web Dynpro Application. And i am using the File Upload UI Element to upload data to R/3, every thing works fine if i upload the file that content is English word. I have 2 questions :
    (1)But it give me dump. Stat 'A character set conversion is not possible'  if I try to upload the file that content is Chinese word.
    (2) But it give me dump. Stat 'A character set conversion is not possible' if I try to upload a pdf file that content is English word.
    The code is:
    method ONACTIONON_UPLOAD .
    DATA XCONTENT TYPE XSTRING.
    DATA: CONTENT TYPE STRING .
    DATA: MIME_1 TYPE STRING .
    DATA: NAME TYPE STRING .
    DATA:
    ROWS TYPE STANDARD TABLE OF STRING ,
    WA_ROWS(300) TYPE C .
    DATA: CONV TYPE REF TO CL_ABAP_CONV_IN_CE.
    DATA: INPUT TYPE REF TO IF_WD_CONTEXT_NODE.
    INPUT = WD_CONTEXT->GET_CHILD_NODE( 'INPUT' ).
    INPUT->GET_ATTRIBUTE( EXPORTING NAME = 'UPLOAD' IMPORTING VALUE = XCONTENT ).
    INPUT->GET_ATTRIBUTE( EXPORTING NAME = 'FILENAME' IMPORTING VALUE = NAME ).
    INPUT->GET_ATTRIBUTE( EXPORTING NAME = 'MIMETYPE' IMPORTING VALUE = MIME_1 ).
    CONV = CL_ABAP_CONV_IN_CE=>CREATE( INPUT = XCONTENT ).
    CONV->READ( IMPORTING DATA = CONTENT ).
    SPLIT CONTENT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE ROWS .
    LOOP AT ROWS INTO WA_ROWS .
    ENDLOOP.
    endmethod.
    could you please suggest for uploading Chinese word ?
    could you please suggest for uploading English word in the pdf file?
    Thanks
    Mahesh

    Hi, experts,
    It is ok. I changed my code. The chinese word is transfered the R/3 system.
    Thanks.
    Best regards,
    tao

  • 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

  • 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

  • Can not dislplay Chinese correctly for sybase db, but correct display Chinese for Oracle db.

    i using sqldeveloper to connect sybase ase 12.5 server and stored Chinese. but when i query out the data , it can not dislplay Chinese correctly, even i using sybase jdbc driver or jtds jdbc driver both error.
    so how to setup sqldeveloper to support Chines for sybase database server.

    Hi Aman,
    I am using Windows 2003 Server on Microsoft Virtual Server.
    I am trying to take RMAN backup from EM. I changed 'system' and 'sys' user passwords in EM after login in as system as normal user. But even then can not connect.
    Also changed 'sys' user password in command ..now aI could login to EM as sys - SYSDBA but while scheduling back up it says
    Validation Error
    Examine and correct the following errors, then retry the operation:
    Error - Connection to host as user dmadmin failed: ERROR: Wrong password for user
    Regards,
    Ranjith John

  • Can not view Chinese [lang pack installed]

    I have a strange problem with following PDF which is generated by TCPDF.
    I have tried with both Acrobat Reader 9 / X, installed all the language pack I can find. Also installed the 2 fonts specified in the PDF file.
    It can be viewed in Google Doc. Other people can view it with no problem on their PC. However, it only shows a blank layout in my PC (picture below)
    You can download the original file here: (try save to your pc instead of view online)
    https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0B9Li-9QY85kaNjYzOTBmN2M tNTI1Zi00YjlmLTgzMzItOWE5MjFjMjM5NTAw&hl=zh_TW
    My OS is WIN7 Ultimate 64 Bit version, stuck for almost a week for me. In the beginning I thought it's the PDF generator's problem but become frustrated after know others and Google can see those Chinese.
    SOME FINDINGS: when choose save to TXT file, wow all the Chinese contents can be saved! but just can not be shown in reader.

    You can download by choosing "File" -> "Download Original File" in Google Doc. Anyway I attach it now.
    https://acrobat.com/app.html#d=tsdG33*6unYtb7IvzO375Q
    It's can be viewed in Online Adobe Reader. It ask me to download "simplified Chinese" font pack the first time I open it on my PC, but still not showing Chinese after installation.
    Can you try open it on your pc? Thanks so much!

  • Storing chinese in client odb from java application

    Hi all,
    first i like to thank Greg Rekounas for his wonderful support and contribution....
    This is my server setup.
    os-windows 2000 sp4
    db-oracle 9ir2 (unicode with AL32UTF8 charset)
    lite-oracle10g r2 (with latest patchset)
    nls_lang- AMERICAN_AMERICA.AL32UTF8
    storing and retriving chinese in oracle 9i database from isql*plus works.
    lite configuration.
    1. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\common\webtogo\webtogo.ora file edited the JAVA_OPTION
    to:
    JAVA_OPTION=-Djava.compiler=NONE -Dfile.encoding=UTF8
    2. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\dmc\common\win32.inf file, added the following:
    a. In the <file> section, added the following:
    <item>
    <src>/common/win32/olilUTF8.dll</src>
    <des>$APP_DIR$\bin\olilUTF8.dll</des>
    </item>
    b. In the <ini> section, added the following:
    <item name='POLITE.INI' section='All Databases'>
    <item name="DB_CHAR_ENCODING">UTF8</item>
    </item>
    <item name='POLITE.INI' section='SYNC'>
    <item name="DB_ENCODING">UTF8</item>
    </item>
    published the application developed in java using packaging wizard.
    downloaded the client in the pc with the following config:
    windows 2000 (english)
    nls - default.
    installed chinese language support.
    tried to access 9i database from isql*plus and stored & viewed chinese characters sucessfully.
    tried to store a chinese character from java application in the client odb -- failed.
    values are getting inserted from the application but when i view them back it shows & # 2 6 0 8 5 ; (i have included a space in between all 8 characters.
    but when i copy this no and paste in msword it shows 日(chinese character)
    i dont know the exact reason for the above scenerio...................
    Also please help me on this too.......
    why can i store & view chinese characters sucessfully in isql*plus from the client machine while i cannot do the same on client odb from java application even though the lite config are done to support utf8?
    is anything i left out?
    should i do any codes changes in java?(java application is of verision jdk1.4_13)
    Thanks,
    Ashok kumar.G

    Sorry for late replay!! in the SharePoint server both the Claim based and Classic mode is enabled in the server, but still I want to get authenticated via Classic mode just like it happens in SharePoint  2007 and 2010, so do i have to use a different
    set of classes to do that if yes can you please tell me those ?

  • Can not read Chinese data when DB Connect to SQL server 2000

    Hi,
       Our BW server( BW3.5 not unicode ) is installed on MS SQL server 2000. We try to connect the BW SQL server with db connect function. We create some test views in the Northwind DB. We are be able to access data from source system in rsa1 by db connect. The problem is that all the Chinese characters are displayed as ?????. Is there any special setting for accessing multibyte characters in MS SQL server 2000? Please advise.
    Thank you,
    Jeff

    The field of VIEW in the sqlserver which code is chinese must be the nvarchar.
    You can try it.

  • How to configure my Firefox thus allowing me to input Chinese characters into the search box by using PenPower writing pad while this problem doesn't exist when I am using Internet Explorer?

    I am using the electronic writing pad made by PENPOWER Inc. to input Chinese characters onto my PC programs (e.g. Winword, Internet Explorer, Excel, etc.) But I can not make it happened on Firefox, please advice what I have to do with the configuration of the Firefox or using any other method to make it work. Thanking you guys in advance for helping me to solve this problem.

    cor-el,
    Thank you very much for your advice. The new software of Penpower works rightaway after I installed it on my pc. Thanks again.
    十分感激你的幫忙!

  • Arabic and Chinese characters are showing ??? in PDF

    Hi
    I hava an application which calls BI publisher API to generate PDF file from rtf temlate and xml input. It is fine for English contents. But the Arabic or Chinese characters are showing ??? in PDF. If I use BI publisher Desktop to load the xml and generate pdf file, it shows correct Arabic/Chinese Characters in PDF. I also copied ALBANWTJ.ttf file to my application JAVA_HOME/jre/lib/fonts/ folder. But it still doesn't work. Anyone can help me with this?
    Thanks a lot!

    I created xdo.cfg and put it in my JAVA_HOME/jre/lib/ folder. the file is configured as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/">
    <properties>
    <property name="system-temp-dir">/tmp</property>
    </properties>
    <fonts>
    <font family="Default" style="normal" weight="normal">
    <truetype path="/fonts/ALBANWTJ.ttf"/>
    </font>
    </fonts>
    </config>
    But now I'm getting this error while generating pdf file:
    Adobe Reader could not open 'xxx.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).
    Is there anything wrong in my xdo.cfg?
    Thanks!

  • Chinese can not be displayed in the graph report

    I create a report using Graph Wizard , the graph contains Chinese. the report on my windows client runs ok, but on the linux server ,the Chinese in the graph could not be displayed,shows some boxes, but the paper layout shows Chinese normal.

    Can anyone help me ? Or have anyone to tell me how the report generated graphics.

Maybe you are looking for

  • Mobile Catalogs not shown in tree structure

    Hallo, I transferd in Elements Organizer 12 four local albums to mobile albums. After having done that by drag and drop and after a long time for synch/uploading, the four albums have disappeared, an all photos are in the catalog "Moblie Alben" Since

  • Problem with keyboard

    when typing the keyboard sometimes repeats keys. I also tried to channge (note the error in the previous word) the keyboard setup (repetition speed and initial delay) but it dooesn't (note again) affect the problem. is someone of you aware of some ot

  • Log_archive_dest_2: SYNC or ASYNC

    All, I have the following setup: Physical standby of a primary, with a delay configured of 23 hours (5 minutes in my test setup). With a delay, should my log_archive_dest_2 parameter contain SYNC or ASYNC? I believe it has to be ASYNC, because I want

  • How to stop lion recovery disk assistant from downloading?

    Since I planned to upgrade the stock disk on my macbook pro I created a USB stick backup of the Lion OS using Lion recovery disk assistant. It built a bootable copy of my Lion OS. I replaced the drive, booted from the USB stick Lion, formatted the ne

  • Memoery Card for N70

    I have just purchased a 1GB Datawrite RSMMC memory card for my N70. It works fine in the PC slots, but the phone does not recognise there is a memory card in the slot. I am missing something obvious that I should be doing to get it to work?