Insert/Retrieve chinese character into/from MS Access

Hi all,
I want to know if there is concrete answer for the problem of maintaining chinese character in MS Access using jdbc/odbc. I have searched the forum but seems there is no working solution, am I correct?
I am writing a db maintenace program in Win XP, using MS Access 2000, jdbc/odbc and Swing. I also got ?????? when retrieving chinese characters from Access. As I am not good at chinese encoding scheme, can anyone tell me how to solve the problem? How to retrieve chinese characters and display in a JTable/text field and how to save chinese characters into MS Access?
Pls give me a hand, thanks in advance.

If all else fails you can just encode them into something that is stored into MS Access. For example you could just use base64 encoding.

Similar Messages

  • Is it possible to read/write Chinese character into Oracle 8i(WE8ISO8859P1) in Applet

    I can display Chinese character in swing label or text field, however, when I read
    the Chinese character data from (or write to) Oracle DB, it shows ??? instead. I can't
    change the code page of my DB, (if use ZHT16Big5 instead of WE8Iso8859P1 as the DB page
    code, than everything is OK. :< ) is there any solution for this?
    Server:
    DB:Oracle8i(8.1.6)with Character set: WE8ISO8859P1
    System Environment:NLS_LANG=American_America.WE9ISO8859P1
    OS: Win2000 Advance Server(NLS:950 Traditional Chinese)
    client:
    Applet (written by JDeveloper 3.2) compiled with code: ISO8859_1
    JDBC Driver: Oracle JDBC Thin Driver (ver 8.1.7 or 8.1.6)
    Browser: IE5.5 (with code Western Europe(ISO) or UTF-8 or Traditional Chinese...)
    null

    Eric,
    There is no good way to do this. In your ASP/ADO application I think you are creating a garbage in garbage out situation. Because the client NLS_LANG matches the DB characterset no conversion takes place. Therefore your chinese characters get inserted in the DB. But the data is really garbage.
    When you use Java thin driver a conversion automatically takes place from UCS-2 -> WE8ISO8859P1. The Chinese characters in UCS-2 have no equivalent code point in WE8ISO8859P1, so you end up with replacement characters ??

  • How to pdf of chinese character into words

    how to converge a pdf file of chinese character into WORD.

    Hi,
    Unfortunately our conversion engine cannot convert text, such as Chinese.  It maybe something that we add in the future however it is not available at this time.
    What languages are supported for OCR by Adobe ExportPDF?
    Adobe ExportPDF supports the following languages for OCR:
    English (US)
    English (UK)
    German
    Spanish
    French
    Italian
    Japanese
    Please refer to the article mentioned below : http://forums.adobe.com/docs/DOC-1812
    ~Pranav

  • Retrieve the unicode from a chinese character stored in MS Access database

    Hi,
    I have a table in MS Access database with chinese character. When I read it from my sql queries I get the "?" instead of the chinese character. When I calculate the unicode I get the 003F which is the unicode for the questionmark. How do I get the correct unicode of the chinese character?
    Connection conn = DriverManager.getConnection("jdbc:odbc:myDB"); Statement stmt = conn.createStatement(); String sqlString = "SELECT Char FROM MyTable WHERE id=2"; ResultSet rs = stmt.executeQuery(sqlString); String s1 = rs.getString("Char");    // the s1 is the ? instead of the chinese character. byte[] b = s1.getBytes(Charset.forName("UTF-16")); int firstByte = 0; short anUnsignedByte = 0; String unicode = ""; for(int  n = 0; n < b.length; n++){     String temp = "";     firstByte = (0x000000FF & ((int)b[n]));     anUnsignedByte = (short)firstByte;     temp = Integer.toHexString(anUnsignedByte);     if(temp.length() == 1){ temp = "0" + temp;     }     unicode = unicode + temp; } unicode = unicode.substring(4); System.out.println("unicode: " + unicode);  //Here I get the unicode, 003f, for the question mark.

    Apparently getString() is already applying the wrong encoding to the bytes which are in the data, so you can't do anything with what it returns. (This isn't surprising since it's Access you are asking about.) I suggest using the getObject() method and see what it returns. If it returns the same string then you are out of luck. But maybe you'll get lucky and it will return an array of bytes containing the correct data. Don't get too hopeful though.

  • Cannot insert Chinese character into nvarchar2 field

    I have tested in two environments:
    1. Database Character Set: ZHS16CGB231280
    National Character Set: AL16UTF8
    If the field type of datatable is varchar2 or nvarchar2, the provider can read and write Chinese correctly.
    2. Database Character Set:WE8MSWIN1252
    National Character Set: AL16UTF8
    The provider can not read and write Chinese correctly even the field type of datatable is nvarchar2
    I find that for the second one, both MS .NET Managed Provider for Oracle and Oracle Managed Data Provider cannot read and write NCHAR or NVARCHAR2 fields. The data inserted into these fields become question marks.
    Even if I changed the NLS_LANG registry to SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280, the result is the same.
    For the second situation, only after I change the Database Character Set to ZHS16CGB231280 with ALTER DATABASE CHARACTER SET statement, can I insert Chinese correctly.
    Does any know why I cannot insert Chinese characters into Unicode fields when the Database Character Set is WE8MSWIN1252? Thanks.
    Regards,
    Jason

    Hi Jason,
    First of all, I am not familiar with MS .NET Managed Provider for Oracle or Oracle Managed Data Provider.
    How did you insert these Simplified Chinese characters into the NVARCHAR2 column ? Are they hardcoded as string literals as part of the SQL INSERT statement ? If so, this could be because, all SQL statements are converted into the database character set before they are parsed by the SQL engine; hence these Chinese characters would be lost if your db character set was WE8MSWIN1252 but not when it was ZHS16CGB231280.
    Two workarounds, both involved the removal of hardcoding chinese characters.
    1. Rewrite your string literal using the SQL function UNISTR().
    2. Use bind variables instead of text literals in the SQL.
    Thanks
    Nat

  • Writing chinese character into a file

    Hi,
    I need to write chinese characters into a file,I used FileOutputStream, using the method write(byte[] b)...
    whereby I will convert the chinese word into bytes....
    but it couldn't work...
    Please Help!!

    you can write the unicode hex string (e.g. 606D559C53D18D22 for Gong Xi Fa Chai) into a text file by using the following code
              PrintWriter out2 = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new FileOutputStream("chinese_out.txt", false), "UTF-8")));
                   int countChineseChar = chineseHex.length()/4;
                   int index = 0;
                   String c = "";
                   int b;
                   for(int i=0; i<countChineseChar-1; i++)
                        c = new String(chineseHex.substring(index, index+4));
                        b = Integer.parseInt(c, 16);
                        out2.write(b);
                        index+=4;
    Note that the OutputStreamWriter uses the UTF-8 to encode the unicode hex. I'm assuming that the hex is fixed at 4 digits each character
    syam

  • Using xsgl:insert-request to insert non-English character data from HTML form

    I tried to insert a text written in French and pasted into an HTML form into my database following the recipe from the XSQL release notes.
    The table:
    create table content_object (
    id number(9) constraint pk_content_object primary key,
    author number(9),
    title varchar2(256),
    abstract varchar2(1024),
    object_type_id number(9),
    content_meat clob,
    XML file the form is posted to:
    <?xml version="1.0"?>
    <xsql:insert-request connection="demo"
    xmlns:xsql="urn:oracle-xsql"
    table="content_object"
    transform="article_form_to_content_object.xsl"/>
    article_form_to_content_object.xsl:
    <?xml version = '1.0'?>
    <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0">
    <xsl:for-each select="request/parameters">
    <ROW>
    <TITLE><xsl:value-of select="title_field"/></TITLE>
    <ABSTRACT><xsl:value-of select="abstract_field"/></ABSTRACT>
    <CONTENT_MEAT><xsl:value-of select="content_field"/></CONTENT_MEAT>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    The result was:
    <ROW num="2">
    <ID>6</ID>
    <TITLE>Le go</TITLE>
    <ABSTRACT>Vin bouchonn</ABSTRACT>
    <CONTENT_MEAT>Des conditions de conservation au tant d</CONTENT_MEAT>
    </ROW>
    All strings were cropped at the point where the first accented character appeared.
    Any idea why this is happening? With English texts it works just fine.
    Maciej

    Another user hit this problem this week. I debugged it and posted the reply in the discussion thread:
    http://technet.oracle.com:89/ubb/Forum11/HTML/002799.html
    It's a JDK bug in character set conversion that has a simple workaround, just indicate the ISO-8859-1 encoding on your XSQL page. See the end of this other thread for details.

  • How to Create a Rich Dynamic Input and Output PDF to insert and get data into, from Database (MSSQL)

    HI ,
    I want to use Adobe LiveCycle Designer and Adobe LiveCycle Workbench features to create a Dynamic PDF form which can allow me to store data into database(MSSQL Server) and Can also provide me the Output PDF form with all the information which has been been filled in by the User in input form. Both Input and Output forms must be Dynamic. I am stuck in this process and Need Experts Advice on the Complete optimal process flow of the Adobe.
    Regards
    Ritesh Grover

    HI
    Go to the lay out of your screen and doublr click on the table control fields, you can get the Properties/Attribute of the screen or table control Fields
    Assing a Group GRP1 for all the fields i n the table control.
    in PBO
    if ok_code = 'INPUT'.
    LOOP AT SCREEN.
    IF screen-grp1 = 'GRP1'.
    screen-input = 1.
    modify screen.
    endif.
    ENDLOOP.
    elseif ok_code = 'OUTPUT'.
    LOOP AT SCREEN.
    if screen-grp1 = 'GRP1'.
    screen-input = 0.
    modify screen.
    endif.
    endloop.
    endif.
    Regards
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Aug 8, 2009 5:27 AM

  • How to insert chinese or Japanese character into database

    Hi,
    Can any one please let me know how to insert chinese character to database.
    We tried to insert some chinese character by copying but the characters are showing different while selecting from the database.
    Should we install any font or something into database server for getting the character???

    Hi,
    If your NLS_NCHAR_CHARACTERSET is set as AL16UTF16, then you can create a table with datatype NCHAR or NVARCHAR in the same instance and will be able to store foreign characters provided your client termional is configured to enter chinese characters.
    Regards,
    Mario Alcaide
    http://marioalcaide.wordpress.com

  • Chinese Character display issue on Coldfusion 10

    My Company using Coldfusion to built an report platform and recently I upgrade our Coldfusion 7MX with Windows Server 2003 to Coldfusion 10 Enterprise with Windosw Server 2008 R2.
    I copy the Code from the Old server to the new one, but I met the problem I couldn’t solve.
    We have a repost that can enter, modify and view our SRM that has Chinese Character display request. Chinese character was display without problem when the system in the old server. which look like following.
    once I move the code into the new server, I got the problem with Chinese Character as following.
    This report pulling the data from SQL2005 with Windows Server 2003 R2.
    Coldfusion code code was same and both version is access to the same database.
    I ran all of the update included to install the windows MUI for Chinese character into the new server,  but I still can't get the character display correctly.
    I can view the chinese character website without issue but only to display in the report.
    I contact with Microsoft tech support but they don't have an solution for me. please help.

    Install windows server language pack:  http://www.microsoft.com/en-us/download/details.aspx?id=12250
    Are you sure the Chinese is encoded in UTF-8?  (It should be, but you should check the database field type encoding.)  If it's simplified chinese it could be set to GB18030 and if it's traditional chinese it could be Big5.
    You might want to leave off the encoding directive in CF and load the page in a browser then change encodings using tools > encodings  to see what works.
    祝你好运!

  • Insert a single space into a NOT NULL column defined as CHAR(1)

    Hi,
    I am trying to run a C program in which I am inserting a space character into a database table, where the column has been defined as CHAR(1) NOT NULL.
    I am initialising a variable defined in C as: char, with a blank but after running the insert statement I get an error: ORA-01400: cannot insert NULL into �. .
    create table nullTest ( col1 char(1) NOT NULL );
    Sample code:
    EXEC SQL BEGIN DECLARE SECTION;
    char dbo_cValue;
    EXEC SQL END DECLARE SECTION;
    dbo_cValue = � �;
    EXEC SQL
    INSERT
    INTO nullTest
    col1
    VALUES
    :dbo_cValue
    My options are: char_map=charz, code=ANSI_C, mode=ANSI.
    I understand that if I was using char_map = VARCHA2, on input - if the input value contains nothing but blanks Oracle treats it like a null, but I am not using VARCHAR2 option, but CHARZ.
    I tried STRING and other options and I cannot get this to work.
    Is there a way where I can insert a space character into a table (using a C program), which has a constraint of �not null� while using C type variables?
    I would appreciated any help on this.
    Thank you.

    Since you did not post a sample of the code that produces an error, its hard to speculate what might be wrong with it.
    But, the following sample works, and successfully inserts a space into the table.
    #include <sys/types.h>
    #include <stdio.h>
    EXEC SQL INCLUDE SQLCA ;
    EXEC SQL BEGIN DECLARE SECTION ;
            VARCHAR col[10] ;
            char * uid ;
    EXEC SQL END DECLARE SECTION ;
    int main(void)
            uid = (char *)"/" ;
            EXEC SQL connect :uid ;
            printf("Connected to Oracle!\n") ;
            strcpy(col.arr, " ") ;
            col.len = strlen(col.arr) ;
            EXEC SQL insert into ins_null values (:col) ;
            EXEC SQL COMMIT WORK RELEASE ;
    }And, here is the table definition, and a select after running the above program once.
    SQL> create table ins_null(col varchar2(10) not null) ;
    Table created.
    SQL> select ':'||col||':' from ins_null ;
    ':'||COL||':
    1 row selected.
    SQL>

  • Display Chinese Character jsp page  by using UTF-8

    hi all,
    I have one jsp page have Chinese character, need to allow user input Chinese character into db, right now my situation is if I set <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> , the Chinese character in my jsp page I can't display correcly, but the inser is okI have to set encoding to big5, then I can't insert chinese character into my db correctly.
    can I use UTF-8 to display my jsp page, which have Chinese Character in there?Thank you!

    Hi Niklas
    thank you for the suggestion. somebody told me UTF-8 suppose work, only if you typing your Chiness character in UTF-8 formate, i don't know that is true or not, but that realy a challenge for me, I using jdbc , some time ago, and then stop, and on that period,if I got free time, I did try to learn some tutorials on struct, hibernate, like http://javaboutique.internet.com/tutorials/Struts/; http://courses.coreservlets.com/Course-Materials/struts.html
    recently I need to deal with some online form , first I want to use struct, but I keep got forwad problem, I forget the detail error message, and found not place to ask questions, so , I pick jdbc again, so ,if you have some useful link in struct or a nice community for people to learn struct, I am look forward to
    know that,
    by the way I set *<meta http-equiv="Content-Type" content="text/html; charset=big5" /> in my jsp*
    String dbURL="jdbc:mysql://localhost/survey?useBig5=true&characterEncoding=Big5"; in jdbc
    keep UTF-8 setting in mysql, it looks solute the problem that I had, hope that can enhabce our knowledge in that
    thank you for the help and wish good luck for future.

  • Use dbms_lob.loadfromfile to handle chinese character

    Hello,
    I have a database with NLS_LANG=TRADITIONAL CHINESE_HONG KONG.ZHT16BIG5
    There is a table with clob type column.
    I've tried to use dbms_lob.loadfromfile to load file content into the clob type column.
    But the result is that no matter the file is english or chinese character, the column's content will become "monster".
    Is there any method to solve this problem ?
    Can anyone help ?
    Rgds,
    Edward
    null

    Hi, it's me again.
    I just want to share my experience and hope that it can help someone and someone can help me !
    I've created a database with UTF8 as my character set.
    With session's character set = UTF8, when I tried to use dbms_lob.loadfromfile to load data into clob column from a file with chinese character content. What has been stored is "monster" character. I know that it's because bfile is with binary type and will not do character set conversion when loadfromfile is being used.
    I've tried the other way, I use dbms_lob.read to read the file and use utl_raw to convert it to UTF8 character set and store it in a varchar2. It works !
    But what I want is to store the chinese character into the clob column.
    I've tried to use the following option but still fail :
    - convert (it's seems that has no effect)
    - utl_raw.translate (it always get oracle error, I've use this as : utl_raw.translate(RAW, 'UTF8', 'UTF8'))
    - utl_raw.convert
    Hope that some have experience can help me !
    Rgds,
    Edward
    null

  • GUI Download Chinese Character to Excel gibberish character

    Hi Experts,
    I'm facing a problem where I'm using FM gui_download to save Chinese Character into Excel file.
    Upon double click to open the excel file, funny character shows up.
    But if I were to open the same file using a blank Ms Excel application (Go to File->Open->choose file),
    Excel will prompt me to select a proper encoding (GB2312 in this case), and the Chinese character can be seen thereafter.
    But, my user doesn't want to go through this.
    I've browsed through the forum and someone has posted about this before and it's unanswered.
    How to download the chinese character using GUI_DOWNLOAD - unanswered
    And, Re: GUI_DOWNLOAD give 2 bytes for each chinese character - I need fixed len which is not related to my problem.
    Below is my code:
    DATA: lv_codepage   TYPE cpcodepage,
            lv_char_cpage TYPE abap_encod,
            lv_encoding   TYPE abap_encod.
    Get Code Page for Chinese Character Spras = '1' or 'ZH'
      CALL FUNCTION 'NLS_GET_FRONTEND_CP'
        EXPORTING
          langu                 = '1'   " Chinese Simplified Table T002
          fetype                = 'MS'  " Manufacturer is Microsoft Table TCP05
        IMPORTING
          frontend_codepage     = lv_codepage
        EXCEPTIONS
          illegal_syst_codepage = 1
          no_frontend_cp_found  = 2
          internal_or_db_error  = 3
          OTHERS                = 4.
    Conversion c(4) = n(10)
      lv_char_cpage = lv_codepage.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'                       "tried ASC and not working as well
          codepage                = lv_char_cpage   "8404 in this case tried 8400 and same result
          replacement             = '#'
          write_field_separator   = 'X'
        TABLES
          data_tab                = i_data_cnvr        "table content
          fieldnames              = i_data_head      "table header
    Please help. Does this has something to do with utf-8 encoding?
    Thank you.
    Thanks,
    ZY See

    Hi Nitesh,
    Is there a way to check the Excel codepage? Do you mean by codepage = 936 for GB2312 encoding?
    Anyway, this issue is fixed. Issue is related to unicode system.
    Below codes for gui_download solved the problem.
    CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = p_file
          filetype                = 'DAT'
          codepage                = '4103'
          replacement             = '#'
          write_field_separator   = 'X'
          write_bom               = 'X'
        TABLES
          data_tab                = i_data_cnvr
          fieldnames              = i_data_head
    Codepage = 4103 for utf-16 Unicode system.
    Write-bom = 'X' to write Byte-Order-Mark.
    Thanks,
    ZY See

  • HOW TO INSERT DATA INTO SQL SERVER FROM MS ACCESS TABLE??

    NEED TO INSERT DATA INTO SQL SERVER FROM MS ACCESS TABLE.

    this is another method
    http://www.mssqltips.com/sqlservertip/2484/import-data-from-microsoft-access-to-sql-server/
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Maybe you are looking for