Problem of Query Chinese words in MySQL using Java (Servlet java)

In my servlet, if I build in this sql inside ,
SELECT * FROM table WHERE location='Chinese word here'
It outputs nothing!
if i change the 'Chinese word here' to English,it have result!
But if I query in mysql, i can
If the 'Chinese word here' is get in a form, (ie 'Chinese word here' is got by req.getParameter but not built in), it can display result, why???

Hi hlj_zhj
Oh your method works, I change the Gb2322 to Big5,
and I have a question about your "return shift", shift is not defined in your part of programme, so I change to follows:
private String getISO(String gbstr){
String temp=null;
try{
String temp_p = gbstr;
byte[] temp_t = temp_p.getBytes("Big5");
temp = new String(temp_t, "ISO8859-1");
catch(Exception e){}
return temp;
ANOTHER question, Some of my BIG5 words contains "Hong Kong Words,eg:�`������", therefore, using temp_p.getBytes("Big5") not work in this case, do you have any suggestion in this case? thanks

Similar Messages

  • Why my iphone produces a bug after it renew for OS5.1.1. The bug is when I use message, type a Chinese word, and then using a releveant word, then the program automately closes. Every time I try the same procedure, it definitely closes.

    Why my iphone produces a bug after it renew for OS5.1.1. The bug is when I use message, type a Chinese word, and then using a releveant word, then the program automately closes. Every time I try the same procedure, it definitely closes.

    Nobody knows? Not even administrators?
    Please it would be really nice to have help on that to take all the benefit of the remote app.
    Thank you very much in advance.

  • Problem in Writing Chinese Wording to File

    Hi all
    I am now doing a java program to query result from SQL Server and write those results to a ASCII text file (the text file is used for another software that only support ASCII text file as input).
    Since records in SQL Server contains Chinese words stored in unicode format, I failed to write a text file with correct Chinese words.
    I assumed the problem related to either:
    (1) String that with record result should be changed in encoding.
    (2) Method to write String to file.
    Please help if you have any idea.
    Thanks a lot
    Shek

    Your problem is the other program. ASCII in itself is an encoding, and its character set does not include Chinese characters, so it writes them entirely differently.
    For instance, if you try to write the Chinese character \u4F2A, that's across two bytes (the 4F is one, followed by the 2A in another). ASCII will be expecting every character to take up one byte at most, so it takes the bytes that represent your Chinese character, and displays them as two separate characters (ASCII 4F, followed by ASCII 2A). If the other program can only handle an ASCII file, chances are that it receives ASCII 4F and 2A, and has no idea whatsoever that these two ASCII characters are in reality your Chinese character. It's likely only thinking in ASCII encoding, not one that can handle Chinese (UTF-8, UTF-16, Big5, GBK etc.). Any idea if this second program has anything dealing with character encodings within its setup and the like?
    Hope that helps!
    Martin Hughes

  • Query from oracle to MySql using dblink fetch all the rows in MySql table

    Hello,
    I am using Heterogeneous connectivity between oracle 10204 to Mysql database.
    I have a database link in the oracle side .
    I am query a table in MySql that have 10 million rows.
    Its doesnt matter if i am running :
    select * from "CDR_Accounts"@mysql where "id"=7675405;
    or
    select * from "CDR_Accounts"@mysql ;
    There is an index on the id column.
    Yet, it seems that the Mysql is feteching all the rows from the table , all the data is transfering to oracle over the dblink , and only after that the requested rows are get back to the client.
    The /etc/odbcinst.ini file is as follow:
    [odbcprd:oracle@odbc /software/oracle]$ cat /etc/odbcinst.ini
    [myodbc3]
    Description             = Mysql connector to mysql version 3.5
    Driver          = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3-3.51.25.so
    Driver64                = /usr/lib
    Setup           = /software/oracle/MysqlOdbc/3.52/lib/libmyodbc3S-3.51.25.so
    Setup64         = /usr/lib
    UsageCount              = 1
    CPTimeout               = 3600
    CPReuse         = Please advice
    Thanks

    When using a gateway it is always possible that a where clause is not sent to the remote database. This is called post processing and depends on several factors like the used ODBC driver, the columns and its data types but also if you specify certain functions in the where clause.
    The fastest way to see if post processing happens is in Oracle 11g the explain plan for a query. In 10g the plan does not always match the statement sent to the foreign database. Here it would be better to enable gateway tracing and setting the trace level to ON. This will log the statements sent to the foreign database and you can compare what statement was sent with the statement you've tried to execute.

  • Problem printing simplified Chinese on PM4i printer using multi-byte data

    I am new to printing data in Simplified Chinese and have tried for a period of time to get it to work but it is not working. I would appreciate any help.
    This is what I have:
    1. Chinese data stored as multi-byte data in oracle 10g db. It is in one of the attribute fields on the mtl_system_items table. The data field it is stored in is defined as varchar2(240). I have to extract that data and print it out as simplified Chinese characters on 3x4 label stock on PM4i printer which is setup to use IPL as the default language.
    2. Purchased the simplified Chinese font kit ( compact flash card ) and plugged it into the compact flash port on back of the printer. The simplified Chinese font is assigned.
    3. Created simple program to build the label file to send to the printer to print the Chinese glyphs. I expected 3 to print but it only prints 1 Chinese glyph and that is not the correct.
    a. Data shown in Chinese
    传感器
    b. Data in hex format => E4BCA0E6849FE599A8
    c. Data in utf8 => ä¼ æ„Ÿå™¨
    d. Simple oracle pl/sql program code to extract data from oracle and create the format file for printing
    CREATE OR REPLACE PROCEDURE china_test_label1 is
    hold_length number;
    v_hold_armpart varchar2(240):= null;
    v_hold_line varchar2(500);
    v_file_name varchar2(100) := 'chlabel1.txt';
    v_file_line1 varchar2(100) := '<STX><ESC>C<ETX>';
    v_file_line2 varchar2(100) := '<STX><ESC>P<ETX>';
    v_file_line3 varchar2(100) := '<STX>E4;F4;<ETX>';
    v_file_line4 varchar2(100) := '<STX>H00;o0200,0200;c60;k32;d0,30;<ETX>';
    v_file_line5 varchar2(100) := '<STX>L1;o102,102;f0;l575;w5;<ETX>';
    v_file_line6 varchar2(100) := '<STX>R<ETX>';
    v_file_line7 varchar2(100) := '<STX><ESC>E4<CAN><ETX>';
    v_file_line8 varchar2(100) := '<STX><ETB><ETX>';
    v_file_line varchar2(500);
    v_file_handle UTL_FILE.file_type;
    v_submit_status number;
    v_out_path_name varchar2(50);
    v_export_path_name varchar2(50);
    -- Program Starts Here
    BEGIN
    fnd_file.put_line(fnd_file.log, '------- Starting Label job -------');
    SELECT description
    INTO v_out_path_name
    FROM fnd_lookup_values
    WHERE lookup_type = 'ARM_DATA_FILE_OUT_PATH'
    AND lookup_code = '$FLMARM_TOP';
    v_file_handle := utl_file.fopen(v_out_path_name, v_file_name, 'W');
    v_file_line := v_file_line1;
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line2;
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line3;
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line4;
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line5;
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line6;
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line7;
    utl_file.put_line(v_file_handle, v_file_line);
    BEGIN
    select attribute13
    INTO v_hold_armpart
    FROM apps.mtl_system_items
    WHERE segment1 = '20928536'
    AND organization_id = 282;
    EXCEPTION
    WHEN others THEN
    v_hold_armpart := 'nothing';
    END;
    v_file_line := '<STX>'||v_hold_armpart||'<CR><ETX>';
    utl_file.put_line(v_file_handle, v_file_line);
    v_file_line := v_file_line8;
    utl_file.put_line(v_file_handle, v_file_line);
    utl_file.fclose(v_file_handle);
    fnd_file.put_line(fnd_file.log, '-------------------------------------------');
    fnd_file.put_line(fnd_file.log, '-- end of job ');
    fnd_file.put_line(fnd_file.log, '-------------------------------------------');
    END china_test_label1;
    show errors;
    e. i do lpr -P printer filename to print the file. here is the file contents :
    <STX><ESC>C<ETX>
    <STX><ESC>P<ETX>
    <STX>E4;F4;<ETX>
    <STX>H00;o0200,0200;c60;k32;d0,30;<ETX>
    <STX>L1;o102,102;f0;l575;w5;<ETX>
    <STX>R<ETX>
    <STX><ESC>E4<CAN><ETX>
    <STX>ä¼ æ„Ÿå™¨<CR><ETX>
    <STX><ETB><ETX>
    i think the issue here may be with formating the mulit-byte data into format it can be printed using the c60 font. Any
    coding examples would be greatly appreciated

    Hi,
    Welcome you post on the forum.
    However, this is not the right forum for you. It is only for SAP Business One user. Please search entire forums first to find which one is more proper.
    However, this issue may not be related to SAP at all. Search on the web would be better.
    Thanks,
    Gordon

  • Unable to connect to mysql using JSP servlet

    Respected Sir/Madam
    I have made a jsp application and use tomcat 4 and mysql .Whenever there is a db connection the application tries to connect.but then it throws exception
    java.sql.SQLException: Unable to connect to any hosts due to exception: java.net.ConnectException: Connection timed out: connect
    This error started occuring all of a sudden and i am not getting its root cause...Can anybody help me out of this...?
    I am having intranet. And one thing that amazed me was when I send request for that JSP page from different machine then it connected to db without any error..Only when I request that JSP page from my machine it is giving me this error.
    Please help..
    Waiting for your reply.
    Thanks and Regards

    Microsoft Telnet> open Oracleserver
    Connecting To Oracleserver...Could not open a
    connection to host: Connect failedYou need to run the exact command i gave you from the command line. There may not be a telnet server running on OracleServer, you are trying to connect to port 23 with the command above.
    run 'telnet Oracleserver 3306'
    If this does not work, try the same thing with the IP address instead of 'Oracleserver', you may have a name resolution issue.
    I didnt understood this .I also tried running this
    command from other machines where my application is
    running fine. But there also the same error.
    I gave proper URL and user name and password for mysql
    String dsnString="jdbc:mysql://Oracleserver/test";FYI - this will use the default port, I usually explicitly provide it (OracleServer:3306). Why don't you try the URL in the format I gave you above, including the user id and password?
    -Scott

  • How to use Add Query Criteria for the MySQL data Base in Netbeans ?

    How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
    When the Query Criteria is add like
    SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
    FROM counselors WHERE counselors.counselors_id = ?
    when i run this Query in the Query Window
    i get a error message Box saying
    Query Processing Error Parameter metadata not available for the given statement
    if i run the Query with out Query Criteria its working fine.

    *I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
    Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
    The Java codes are:
    public void dropDown1_processValueChange(ValueChangeEvent event) {
    Object s = this.dropDown1.getSelected();
    try {
    this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
    this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
    this.Trip_tabDataProvider1.refresh();
    } catch (Exception e) {
    this.log("Error: ", e);
    this.error("Error: Cannot select user"+e.getMessage());
    SQL statement for Trip_tabRowSet:
    SELECT ALL Trip_Tab.Trip_Date,
    Trip_Tab.User_ID,
    Trip_Tab.Destination
    FROM Trip_Tab
    WHERE Trip_Tab.User_ID = ?
    Error messages are shown below:
    phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
    com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
    com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
    com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
    java.sql.SQLException: No value specified for parameter 1
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
    at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
    at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
    at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
    at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
    at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
    at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
    at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
    at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
    at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
    at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
    at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
    at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
    at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
    at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
    at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
    at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
    at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
    Could anybody look into this issue.
    Many thanks
    Edited by: linqing on Nov 22, 2007 4:48 AM

  • ** Problem in opening a word document using DDE.App_Begin *

    Hi All,
    I used this code in a when-button-pressed trigger in a button to open a word documnet:
    declare
    AppID PLS_INTEGER;
    filename varchar2(100);
    begin
         FILENAME := :FILE_PATH; -- :file_path has the full path to the word document foe ex. : D:\Copyf.doc
         AppID := DDE.App_Begin('C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE filename',DDE.APP_MODE_NORMAL);
    end;
    But when I press the button it gives me this error in Microsoft Word:
    Word experienced an error trying to open the file.
    Try these suggestions.
    * <some suggestion>
    * <some suggestion>
    * <some suggestion>
    How to solve this problem?

    Thanx Magoo
    Dear Andreas
    I've creatred a table to store the word files paths that the user wants to attach to a parfent record!
    and then created a form to query all word-documents that is attached to that parent record to let the user open it
    Is your code benefit to me in that case?
    I tried to do it but the other one (Magoo's code) only open the CMD Prompt!
    Iam using:
    Form 6i: Version 6.0.8.11.3
    OS: Windows XP SP2

  • Problem to insert  Chinese Characters(GB3212)  into MySQL

    I met a problem to insert Chinese Characters (GB3212) into MySQL using Entity Bean (or JPA).
    For example, when a hardcoded string "{color:#ff0000}&#30005;&#22120;me&#20803;&#20214;{color}" is inserted, it is displayed as "{color:#ff0000}??me??{color}" in MySQL.
    The NamedQuery is also not working for Chinese Characters.
    The setting are as following:
    GlassFish JDBC connection pool: useUnicode=true, charecterEncoding=gb2312
    NetBeans IDE: source encoding set to GB2312;
    MySql table: the column set to CHARACTER SET gb2312;
    Any experts, please give advice
    Thanks lot

    I didn't noticed that there is a {color:#ff0000}sun-resources.xml{color} file under {color:#ff0000}<ejb project>/server resources{color}.
    This file has a pool configuration. This config just overwite the paremeter i added using Admin Console every time a client is lauched. So there are two option to fix this problem.
    1. Insert the follwowing two lines into the {color:#ff0000}sun-resources.xml{color}
    <property name="characterEncoding" value="gb2312"/>
    <property name="useUnicode" value="true"/>
    2. delete the everthing in the {color:#ff0000}sun-resources.xml, using Admin Console {color}config your own pool & DataSource
    I tried first option & it works.

  • Some chinese words problem in Javamail via MS Exchange Server

    Dear All
    I have a Javamail problem.
    When I use Javamail to send email via MS Exchange Server, there are some chinese words will become corrupt code and not all chinese words. i.e ("��", The code in big5 is "F9 D6").
    If I use Javamail + Linux SendMail, this problem will not happen. All chinese words will display correctly by the same program. Anybody else know why and how to resolve it?
    The following code is part of my program.
    String mailHost = "192.168.1.255";
    String subject = "TESTING WORD ��";
    String mailBody = "TESTING WORD ��";
    Properties props = new Properties();
    props.put("mail.smtp.host", mailHost);
    Session session = Session.getDefaultInstance(props, null);
    MimeMessage msg = new MimeMessage(session);
    msg.setFrom(from);
    msg.setRecipients(Message.RecipientType.TO, addressTO);
    msg.setSubject("=?big5?B?" + enc.encode(subject.getBytes()) +"?=");
    msg.setContent(mailBody, "text/html; charset=big5");
    Transport.send(msg);

    clearly looks like an MS Exchange problem to me. May be they are not encoding the 8 bit data properly? So, you are using MS Exchange to send it and which client do you use to read the mail sent?

  • I'm having trouble opening a word document on my new Macbook Pro. I opened it with no problems on my iPhone5. I tried using TextEdit and OpenOffice. Thanks!

    I'm having trouble opening a word document on my new Macbook Pro. I opened it with no problems on my iPhone5. I tried using TextEdit and OpenOffice. Thanks!

    I open Word documents on my Mac using Pages and textedit without any problems.
    I also have a copy of OpenOffice and it can also open Word documents without any problems.
    Could you please provide more details on exactly what you mean when you say you having troubles opening Word documents? What kind of troubles?
    Allan

  • Can i use chinese words in the iphoto ?

    can i use chinese words in the iphoto ?

    Yes.  The usual Chinese keyboard can be accessed from within iPhoto.

  • Ios5 work on 3GS very slow specially use chinese word

    can i down grade ios5 to ios4 because ios5 work in 3GS very slow specially use Chinese word key pad on sms or note,some time wait until 10s will appear the word wasted my time.
    ios5 very slow in 3GS open app,app using.

    MXStar wrote:
    Tried pairing to my ipod touch (to transfer photo's), my wifes iphone 3gs(with the same issues) a friends iPhone 4s, a car handsfree kit we purchased just for these phones and my old nokia so i could tranfer all my old photo'sover (unsuccessful).
    Yeah.... only thing in the list that might possibly work is the handsfree kit. As roaminggnome stated, pairing to other phones is not supported.
    When trying to pair to the handsfree device, was the device actually in discoverable mode?

  • After update firmware cannot to search contact use chinese word

    Hi all, My Q10 just update to firmware 10.2.1.537, after update I search the contact use chinese word,  always show “no result”, has anyone have the same issues? Can I back to previous version of firmware? Many thanks to all.
    Software version: 10.2.1.537
    OS version: 10.2.1.1925
    Trad. Chinese version ( Hong Kong)

    Oh, my apologies then, I don't understand your issue.
    Perhaps someone else will have some assistance.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Small problem in sending chinese charaters using file adapter

    Hi,
    Actual scenario is,
    Sender system -> file adapter -> XI -> ABAP Proxy -> Receiver system.
    error is occured when the data reached the XI.
                                                                                    1. The data file contains Chinese characters (Unicode).                                                     
    2. When file adapter reads this file, the data in the payload no longer   
        shows Chinese characters.                                                 
    Can you please help in this regard...
    Thanks,
    Surya.

    Hi,
    Actually i am sending an EXCEL sheet which contains chinese charaters to XI using sender file adapter.
    When file adapter reads this file, the data in the payload no longer shows Chinese characters.
    what i need to do?
    SUrya...

Maybe you are looking for