Search on Chinese Characters

Hi,
I have problem with running a query where I search for records using the "like" clause. The data is in Chinese and search is inconsistent.
The records are sometimes displayed right with certain like criteria where as they fail with the others.
Any help?
Thanks.

The encoding used in <String>.getBytes(java.lang.String encodingName1) and that used in the constructor String(byte[], encodingName2) ought to be the same, i.e.,
"encodigName1.equals(encodingName2)" must be true.
And if you obtain a byte array through the getBytes("US-ASCII") the correct information of Unicode characters is lost there.

Similar Messages

  • Issue Searching for Chinese Characters

    I am creating pdfs from SQL Server Reporting Services. I have the data stored in Chinese characters and it displays fine when the files are opened. Our problem is we are unable to search for any Chinese characters. When we copy a Chinese character from the document and paste into the search box we get the following and it does not find the characters.   
    When I inspect the Fonts it has the following :
    Calibri /regular/bold/Italic (Embedded Subset)
         Type:True Type
         Encoding:Ansi
    PMingLiU (Embedded Subset)
         Type:True Type
         Encoding:Ansi
    PMingLiU (Embedded Subset)
         Type:True Type(CID)
         Encoding:Identity-H
    Do I need to install different fonts on my server or clients to make the search box recoginize the Chinese characters.
    I am using Reader v10.1.7 and I have installed both Chinese font packs

    What is your operating system?
    I cannot reproduce this with English Reader 11.0.3 on Windows 7.  I open a random Chinese document (i.e. http://newyork.china-consulate.org/chn/lszj/P020110622119203610776.pdf), then search for some Chinese characters (e.g. 中国), it displays it correctly in the search box, and also finds the characters in the document:
    Do you use the English or Chinese Reader version?

  • 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.
    十分感激你的幫忙!

  • How to use a select statement with chinese characters?

    I am currently developing a java servlet<using tomcat 4.x> which allows me to use select statement to retrieve results from the Microsoft SQL Server 2000 database. I am using a simple form to get the parameter for querying. The main problem i'm facing is that there are chinese information in the SQL database, but i can't retrieve it through the sql statement with the chinese characters input<thru the form with the help of NJ STAR>in the WHERE condition. When i execute the statement, it returns me no results even though the rows are present in the database.
    Does anyone have the solution to using chinese words in the WHERE clause of the select statement to retrieve results with columns which contains chinese characters? Please help me. Thanks everyone. :)
    PS: when i cut and paste those characters in the sql database and paste onto java.. it is ??? in questionmarks.. but when i paste them into excel 2000.. its shown as chinese chars again..
    please heelppp~~

    Greetings,
    PS: when i cut and paste those characters in thesql
    database and paste onto java.. it is ??? in
    questionmarks.. but when i paste them into excelThis is why the SELECT is not returning any results.
    You need to set the character encoding set on your
    statement and parameters for the characters to be
    properly translated. Refer to the charsetName
    parameter in the String class constructor in your API
    docs and also to
    $JDK_DOCS/guide/intl/encoding.doc.html in your JDK
    documentation.
    2000.. its shown as chinese chars again..Because Office programs are performing the same kind
    of character translation with the appropriate MS APIs.
    please heelppp~~Regards,
    Tony "Vee Schade" Cookis it possible for you to show me some coding examples? i don't really understand what is to be done in order to set the char set and what does it really do.. tried reading up but still dun understand.. :(
    pardon my shallow knowledge of java..
    ok..
    The thing is when i used an insert statement with chinese characters of GBK format hardcoded into the java servlet and then i use the insert statement to insert the chars into the database, it cannot be seen as a chinese word when i off the NJStar. and then it can be searched out with my current form of servlet.. below is my coding of the servlet..
    note: i've set my html file to charset = GBK
    //prototype of Search engine...
    //workable for GBK input and output...
    import java.io.*;
    import java.io.OutputStream;
    import java.io.IOException;
    import javax.servlet.http.*;
    import javax.servlet.ServletException;
    import java.util.*;
    import java.sql.*;
    import java.nio.charset.Charset;
    public class SearchBeta extends HttpServlet {
         private Vector musicDetails = new Vector();
         private String query = "";
         public void service (HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException, UnsupportedEncodingException {
              query = req.getParameter ("T1");
              System.out.println("before:"+query);
              String type = req.getParameter ("D1");//type
              query = req.getParameter ("T1");
              //query = "������";
              System.out.println("after:"+query);
              getResults(type,query);
              System.out.println("locale = :"+req.getLocale());
              res.setContentType ("text/html;charset=GBK");
              PrintWriter out = res.getWriter();
              out.println("<html>");
              out.println("<head>");
              out.println("<body bgcolor = \"black\">");
              out.println("<font face = \"comic sans ms\" color=\"Cornsilk\">");
              if (query.length()==0)
                   out.println ("Please key in your search query.");
              else if (musicDetails.size()==0)
                   out.println ("Sorry, no results matching your search can be found.");
              else {
                   out.println("<center>");
                   out.println("<table cellspacing = \"50\">");
                   int i = 0;
                   //Display the details of the music
                   while (i<musicDetails.size()) {
                        Results details = (Results)musicDetails.get(i);
                        String dbArtist = "";
                        String dbAlbum = "";
                        String dbTitle = "";
                        String dbCompany = "";
                        dbAlbum = details.getAlbum();
                        dbTitle = details.getTitle();
                        dbCompany = details.getCompany();
                        dbArtist = details.getArtist();
                        try{
                             dbAlbum = new String(dbAlbum.getBytes("ISO-8859-1"),"GBK");
                             dbTitle = new String(dbTitle.getBytes("ISO-8859-1"),"GBK");
                             dbCompany = new String(dbCompany.getBytes("ISO-8859-1"),"GBK");
                             dbArtist = new String(dbArtist.getBytes("ISO-8859-1"),"GBK");//correct translation.
                        catch(UnsupportedEncodingException e){
                             System.out.print(e);
                             e.printStackTrace();
                        String dbImage_loc = details.getImage();
                        out.println("<tr>");
                             out.println("<td><table>");
                                  out.println("<img src=C:\\Program Files\\Apache Group\\Tomcat 4.1\\webapps\\examples\\ThumbNails\\"+dbImage_loc+">");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Artist: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbArtist+"</font></td>");
                             out.println("</tr>");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Title: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbTitle+"</font></td>");
                             out.println("</tr>");
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Company: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbCompany+"</font></td>");
                             out.println("</tr>");
                             System.out.println("album: "+ dbAlbum);
                             out.println("<tr>");
                                  out.println("<th><font color=\"violet\"> Album: </font></th>");
                                  out.println("<td><font color=\"Cornsilk\">"+dbAlbum+"</font></td>");
                             out.println("</tr>");
                             System.out.println("company: "+ dbCompany);
                             out.println("</table></td>");
                        out.println("</tr>");
                        i++;
                   out.println("</table>");
                   out.println("</center>");
              out.println("</font>");
              out.println("</body>");
              out.println("</head>");
              out.println("</html>");
              out.close();
              //to remove all the elements from the Vector
              musicDetails.removeAllElements();
         //get Searched Music Details and store in Results object which is stored in musicDetails vector
         public void getResults (String type, String searchQuery) {
              try {
                   Class.forName ("com.microsoft.jdbc.sqlserver.SQLServerDriver");
                   Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=music","sa","kokkeng");
                   Statement stmt = con.createStatement();
                   String query = "SELECT * FROM MusicDetails WHERE "+type+" = '"+searchQuery+"'";
                   ResultSet rs = stmt.executeQuery(query);
                   while (rs.next()) {
                        String artist = rs.getString("Artist");
                        String title = rs.getString("Song");
                        String company = rs.getString("Company");
                        String album = rs.getString("Album");
                        String image_loc = rs.getString("Image");
                        Results details = new Results (artist,title,company,album,image_loc);
                        musicDetails.add(details);
                   stmt.close();
                   con.close();
              catch (Exception e) {
                   System.out.println(e.getMessage());
                   e.printStackTrace();
    with the above servlet i created, i can search out the data in the database which i've inserted through the insert statement. I still can't search for things i've keyed into the database directly using NJStar..
    thank you so much for helping.. really hope any one else who knows the answer to this will reply too... thank you all so much...
    -KK

  • Printing chinese characters on a Zebra printer using Adobe Interactive Form

    Hello,
    We have created an Adobe Interactive Forms in SAP with some words in English and another one in simplified chinese. We have defined a Zebra printer in SPAD with the AZPL203 driver.
    When we print the form in the zebra printer some of the chinese characters are printed and some of them no.
    Has anyone faced the same problem?
    Thanks a lot
    Miquel A. Vergara

    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

  • Chinese Characters in Netlogon.log

    Hello,
    I have enabled netlogon logging, and am noticing a few things that I am unable to diagnose after further research. My main concern is with a critical error that seems to occur every ten minutes. Occasionally the Chinese characters change but always translate
    to roughly the same message. Searching google for information about "I_NetlogonLdapLookup" has provided no helpful information either. Does anybody know what could cause this? We have 3 DCs (Server 2008R2, 2012) and this shows up in all three netlogon
    logs.
    08/26 17:55:40 [CRITICAL] I_NetlogonLdapLookup: unrecognized parameter 湄䡳獯乴浡ѥ䠗偙剅㍖渮
    All client computers are Windows 7 Pro x64. Any help is appreciated, thanks.
    Alex Tester Information Technology Assistant National Automotive Experts

    I noticed having chinese characters in my netlogon.log as well:
    10/23 02:27:14 [CRITICAL] I_NetlogonLdapLookup: unrecognized parameter
    湄䡳獯乴浡ѥ嘓ⵓ䅒㉓挮
               10/23 02:27:14 [MAILSLOT] Received ping from SERVERNAME DOMAINNAME.SUFFIX (null) on UDP LDAP
    The [CRITICAL] error occurs with the [MAILSLOT] ping record at the exact same time. The server name in the [MAILSLOT] error is always a 2012 server.
     Almost all of my 2012 servers are in different [MAILSLOT] ping records at different times coupled with the [CRITICAL] error. 
    I have a mixed domain with 2008 SP2 DCs at 2003 forest and domain functional levels.
    I would contribute this problem to having 2012 servers in the domain. As to why this is occurring, I cannot figure out.  I haven’t been able to find any logs on the 2012 servers displaying this information.

  • Chinese Characters in Netlogon.log -- re-asking

    We have  822 occurrences of the following:
    [CRITICAL] I_NetlogonLdapLookup: unrecognized character <Chinese characters>
    in the last 2 days. The previous thread on this subject was marked "Answered" without being answered, so I'm re-asking:
    1. Does anyone have any substantive information about what's sourcing this?
    2. How can I associate a source IP with a single entry in the netlogon.log?
    Here's what we know so far:
    We have a Chinese linguist who has broken the character string down to 2 sections, the first being the same for all occurrences and the second being random-looking. He says the first section refers to "boats" or "water" and is looking
    farther, but he says the string definitely looks like virus-like activity.
    Second, I_NetlogonLdapLookup is a function inside netlogon.dll, so intuition says something is trying to do an LDAP lookup on the Chinese character string. We are looking into exactly how that function is supposed to be called (we're network guys, not
    coders, so this may take longer than it should). Can someone help shorten this search?
    C: There's no consistent contextual activity surrounding the actual log entries, so we're expecting to find out that there's  more than one source, so it's extra important we figure out how to associate a source IP with these [CRITICAL] log entries,
    especially since we may be looking for a root kit or something else that's able to hide from our multiple AV programs.
    Assistance is appreciated, good analytical step-oriented result-generating assistance is GREATLY appreciated!
    Robert
    Oh yeah -- this is being logged on a DC in a 2008R2 domain with a small but growing number of 2012 member servers and almost no remaining servers lower than 2008R2. I can provide more details if anyone needs them

    Hi all --
    OK. It looks like we're all on the same page.
    Here's a summary of the issue:
    netlogon.log [CRITICAL] entry is  reporting a failed attempt to execute an LDAP lookup on a Chinese character string (I_NetlogonLDAPLookup is a function inside netlogon.dll). There are no audit failures or other Event Log warnings or errors associated
    with the log entries, so it's likely that the lookup is being performed after logging on to the domain with valid credentials. We don't think the character string is corrupted data because the first half of the string is identical in every
    log entry and the total number of characters used across all occurrences is very small). Also, the variations in the 2nd half of the string are methodical and repetitive.
    We hoped that translating the Chinese string would yield a clue pointing to the source of the attempted LDAP lookup. That didn't happen so we now must figure out how work back from the netlogon.log entry to the source platform.
    The current situation:
    The [CRITICAL] entries continue to be logged.
    The distribution across 3 days of logs is making it look like we need to assume not one, but multiple sources.
    I appreciate the standard advice re: 3rd-party AV software, DC build practices, security scans, power erasers and the like, but we are a QA/Test lab for a very complex product; scientific method and the need for operational stability preempts
    us taking any corrective actions on any of our DCs (8 machines, 4 domains, 2 forests), Exchange servers (4 versions, 2 clusters per version) , Lync (2 versions), OCS, PKI, WSUS, DNS, DHCP, DHCPv6, SQL, or member servers until we actually prove that the machine in
    question is a source of the bogus lookup attempts.
    Paul -- I REALLY appreciate your straightforward no-bs reply. I can work with "I don't know" . Try-this-article-I-just -Googled Whack-A-Mole easter egg hunts, however....   <grin>
    I'm going to close with one last (hopefully ) simple question: Where do I start the search for the UberSME who knows how to read the netlogon.log - specifically how to connect an event with its legitimate predecessor. Somebody
    wrote the service, somebody knows how to interpret its logging output. Where do I start looking for them?
    Best Regards,
    Robert

  • Full text search in Chinese Language not finding results

    We are translating one of our Webhelp projects into
    simplified chinese, and everything is working fine except full text
    search. We can type chinese characters into the search box but no
    results appear even though we have already translated a lot of the
    webhelp into chinese. Note that we have breadcrumbs, TOC and Index
    functioning correctly in chinese.
    The FAQ for Robohelp claims that FTS is supported in other
    languages but I am stuck - I can't figure out how to make it work.
    Any help would be greatly appreciated.

    There was some language stuff in those patches that I hoped
    would fix your problem, obviously not.
    I am not familiar with working with languages. Have you tried
    changing the language in Project Settings? Have you tried importing
    a couple of topics into a new project?
    Beyond that, hopefully someone with more relevant knowledge
    can help you.

  • I have Chinese Characters showing up on the top of my Firefox page.

    The Chinese Characters have been showing up for a couple of months. I have tried using various Virus Detecting programs such as MalewareBites but they don't seem to fix the problem. These Chinese Characters show up on the initial Firefox Search Screen as well as my ANZ Bank and Ancestry.com.au webpages just to name a few. How can I get rid of them. These Chinese Characters don't appear on Google or Internet Explore. If this can't be fixed I may have to stop using Firefox and use Google or Internet Explorer. I have tried attaching an image of this problem but it appears I am unable to.

    Hi, this is a known problem with McAfee Site Adviser, so if you are using it, that could be the cause. [https://community.mcafee.com/thread/76071?tstart=0 Here's a link to their forum], and [http://service.mcafee.com/faqdocument.aspx?id=TS100162 here's instructions] for removing it - should you wish to.
    Hope that helps.

  • Chinese Characters Displaying as Boxes

    My iTunes used to display Chinese characters fine. But today, they all show up as boxes. I originally thought that it was something wrong with Windows, but I'm pretty sure it's an issue with iTunes. I tried to type in Chinese, and it works fine in other programs, but when I do it within iTunes (to change a song title), it becomes a box. And when I browse to the file within My Computer, the filename shows up in Chinese. But if I look at the properties of a song (Get Info), it will show the path with all the Chinese characters replaced by boxes. I believe this problem came up today, as I synced my iPhone last night, and it was fine then. I even tried to change the Language Preferences, but that only changed the menus and my songs are still boxes. Anyone else have this problem?

    Anyone else have this problem?
    Search this forum for "chinese" to find other reports.

  • Insert chinese characters to mysql

    I have searched the forum and found a useful links --http://forum.java.sun.com/thread.jspa?threadID=530358 about inserting chinese characters to mysql. However, I can't see the chinese characters displayed in the db. The charset and collation of my table are utf8 and utf8_bin respectively. Can anyone help me? Below is my source code
    ------------------ Servet ---------------------
    package test;
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class testServlet extends HttpServlet {
    private Connection conn;
    public void init(ServletConfig config) throws ServletException {
         sSysPhyPath = config.getServletContext().getRealPath("/");
    public void doGet(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
         // set content type and other response header fields first
         res.setContentType("text/html");
         // get the communication channel with the requesting client
    PrintWriter out = res.getWriter();
    out.println("<html>");
    out.println("<body bgcolor=\"white\">");
    out.println("<body>");
         req.setCharacterEncoding("UTF-8");
         sValue = req.getParameter("s1");
         out.println(sValue.getBytes("UTF-8") + "<br>");
         DBConnection objConn = new DBConnection(sSysPhyPath);
         try {
              conn = objConn.get();
              objConn.execQuery(conn, "insert into TBL_test (test_desc) values ('" + sValue.getBytes("UTF-8") + "')");
         catch(Exception e) {
              e.printStackTrace();
         objConn.closeConnection(conn);
    out.println("</body></html>");
    public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException
    doGet(req, res);
    public void destroy() {
    --------------- Html ------------------
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    </head>
    <body bgcolor="#666666">
    <form name="test" method="post" action="testServlet">
    <input type="text" name="s1">
    <input type="Submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>
    Besides, if I code the chinese characters directly in the servlet page, what is the encoding of the chinese characters by default? Is it related to my OS locale?
    Thanks a lot.

    objConn.execQuery(conn, "insert into TBL_test
    st (test_desc) values ('" + sValue.getBytes("UTF-8")
    + "')");You would be better off using a PreparedStatement and parameters. This will let the MySQL JDBC driver take care of the required encoding.

  • Command line e-mail with Chinese Characters

    We are writing a script that tells users that their password will expire
    in 2 weeks and how to change it in various places like network,
    GroupWise, PDA, conferencing system...
    Problem is that we have Many Chinese so we want the e-mail to be in both
    Chinese and English. We are using nail to format the e-mail but it is
    always coming through with boxes for the Chinese characters. Any idea
    one where the problem is occurring?
    Thanks,
    John

    John,
    It appears that in the past few days you have not received a response to your
    posting. That concerns us, and has triggered this automated reply.
    Has your problem been resolved? If not, you might try one of the following options:
    - Visit http://support.novell.com and search the knowledgebase and/or check all
    the other self support options and support programs available.
    - You could also try posting your message again. Make sure it is posted in the
    correct newsgroup. (http://forums.novell.com)
    Be sure to read the forum FAQ about what to expect in the way of responses:
    http://forums.novell.com/faq.php
    If this is a reply to a duplicate posting, please ignore and accept our apologies
    and rest assured we will issue a stern reprimand to our posting bot.
    Good luck!
    Your Novell Product Support Forums Team
    http://support.novell.com/forums/

  • Copy/Paste Bug (Chinese Characters Added)

    Hi everyone,
    I'm not sure what is going on but recently, when I copy/paste something on my MacBook Pro, running the latest Mavericks, it sometimes appends some weird Chinese characters at the end of it. It will only show up sometimes and only in certain programs (such as copying URLs).
    This worries me very much for some obvious reasons. I don't have Chinese enabled, the characters are not always the same, and I have absolutely no idea why it is doing this.
    Any suggestions? Is this some weird but known bug? Am I the victim of some sort of spyware? Any suggestions as to what I should use to try to track this down? A quick google search turned nothing up.
    I would demonstrate the bug here but it isn't currently reproducing the problem. As I said earlier: It's rather intermittent.
    Any help or suggestions would really help me out.
    Thanks.

    I doubt anyone can help without a screen shot of what you are seeing.  Come back when you have one.  In the meantime I would not worry, it is most likely some kind of encoding glitch.  You don't have to "enable" a language to have it displayed on your screen, OS X automatically does that.

  • Firefox has a hidden tab with Chinese characters.

    The Firefox block on the taskbar line had Chinese characters displaying the current location. I closed all of my tabs and then clicked to quit Firefox. I then got a dialog box stating that I had multiple tabs open with Save, Quite, Cancel as options. The Chinese site was some how operating on a hidden tab. I had visited only sites such as BBC, Google Search, some trusted weather sites and downloaded some PDF from sites the McAfee had flagged as Safe. Any ideas?

    If you see CJK (Chinese/Japanese) characters on the Firefox title bar or the Windows Taskbar then that can happen if Firefox switches to UTF-16 encoding for some reason.
    The "RealPlayer Browser Record Plugin" extension (Tools > Add-ons > Extensions) has been reported to cause that issue.
    Be sure not to get confused with the RealPlayer plugin (Tools > Add-ons > Plugins) that plays media files.
    The extension adds some extra features like saving media files.
    You can disable/remove the RealPlayer Browser Record Plugin extension in the RealPlayer Preferences (RealPlayer: Tools > Preferences > Download & Recording)
    See also [[Troubleshooting extensions and themes]]

  • How to input & display Chinese characters?

    How could I use Chinese pinyin method  on the table ? 
    And show Chinese characters in documents to go?
    Any ways to resolve this problem?
    TX
    7290--------8830-------9800-------playbook and ... 9900?

    you are correct. Every single BlackBerry Playbook sold in the world lacks Chinese input.
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

Maybe you are looking for

  • How to tracert to outside in ASA 5505/5520?

    Hi,everybody The tracert issue have troubled me for a long time. I don't know how to deal with it. Pls give me some advice. Thanks! Following is the details. The network have two firewall(ASA 5505,ASA 5520) placed in different cities. And all person

  • Old Computer whent bad how do I deauthorize it?

    All right I live in more than one place to start off with so I have 2 computer two start with that I authorize to play and down load music + a laptop. Well I had a hard drive go bad on one computer and then my Step father decied to reload the pc that

  • VAT exempt company being made to pay VAT. Anyone have any advice how to get around this?

    Hello all, I am sure I acan't be the first to have hit his barrier but when enrolling as a developer and going through to the checkout there is a mandatory charge of VAT on the subscription. All very well if I am a UK business but in this case I am w

  • Running MDME on XP

    Hello all, I know it's not supported but I'm trying to run MDME server on XP. I know it's technically possible, but I'm struggling with the sql server setup. I'm attempting to use MS SQL Server Desktop Engine as the SQL Server. This is running fine a

  • Jabber A/V works, sometimes, on some machines..

    Hi, Before I head on over to the server side of the forums, maybe someone can help as I'm sure the server side is doing its job. Its a very simple setup. OX Tiger 10.4 Server running the ichat jabber service. All clients authenticated and logged in t