Non-English characters

Hello, I have read several times that since Java uses Unicode, it solves the problems of non-English characters automatically or something like that.
But my app is not working as expected. Would someone help please?
I have a client/server combo written in Java. The server can send messages in English or Japanese. The Japanese messages are hard-coded as String literals in the server source code. On the client side, they are displayed on a JEditorPane. But the Japanese characters are all garbled. The OS on the server side and client side are, of course, different.
My supposition, which is obviously wrong as it is not working, is that since both ends of communication are Java app, I need not worry about any encoding conversions for String literals.
Suggest me what is wrong here?

How is the required encoding/decoding supposed to be done?
When I didn't worry about non-English characters, I did the following, which WORKED.
// SENDER side
Socket socket ;
PrintWriter     out = new PrintWriter(socket.getOutputStream(),true);
String outMessage = "my message";
out.println(outMessage);//RECEIVER
Socket socket ;
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
String inMessage =  in.readLine();When non-English characters are involved, I did the following, which DID NOT WORK. Please someone correct me.
// SENDER side
Socket socket ;
PrintWriter     out = new PrintWriter(socket.getOutputStream(),true);
String outMessage = "my message";
String utfString = new String(outMessage.getBytes(),"UTF-8");
out.println(utfString);//RECEIVER
Socket socket ;
InputStreamReader ins = new InputStreamReader(clientSocket.getInputStream(),"UTF-8");
BufferedReader in = new BufferedReader(ins);
String inMessage =  in.readLine();The received message is still garbled.

Similar Messages

  • Non english characters in DN cannot be retrieved

    We are using Netscape directory server 4, protocal V3. We have a problem related to non-english characters appearing in RDN.
    We publish to Ldap entries using the values from database. For example, we have pubulished an entry to Ldap, based on DB values, the entry should have a DN like: ou=Liege BELGIUM ... LGG1a, <other components of DN>. However, when we call netscape search API (search against uid attribute which does not have non-english characters), the search return the entry, but when further call getDN() method on the returned Ldap Entry, it only returns Li, instead of the complete DN value.
    It seems the entry is corrupted in Ldap. I wanted to delete the corrupted entry and re create new one to test. I tried many ways, but none of them worked, I think it is because DN is corrupted, there is no key value to identify the Ldap entry for any operation(modify, delete).
    You help and insights are much appreciated.
    Thanks.
    Han Shen

    LDAP uses the UTF8 encoding. You must store data in the directory using the UTF8 encoding. This includes DN values. This also means that if you want to be able to view the values in your native character set and font, you must use an application that can convert the UTF8 LDAP data back to the native character encoding. The directory console by default should work for LATIN-1 (ISO 8859) languages if the LOCALE is set correctly.

  • Non English characters in BIP email

    Hi, my report contains Japanese characters, when I view the output in HTML format. It is displayed properly. But when I click on send button , enter email parameters like to, cc, bcc, subject , etc and send it, in the mail I receive, the japanese characters are not getting displayed properly. The same problem occurs for spanish and portugese texts-in general to all non english characters. I am using Oracle Business Intelligence Publisher Release 10.1.3.4. If someone has faced a similar issue, kindly help. Thanks in advance

    Suggestions
    1) Try with NLS_LANG as
    SWEDISH_SWEDEN.WE8DEC
    2) Make a paramform and enter via paramform (unencoded)
    (This is just for testing purpose)
    3) Change machine locale to swedish and try
    4) Which reports version is this ?
    Please see
    BUG 2713695 - NLS CHARACTERS FOR PARAMETERS CHANGE TO QUESTION MARKS WHEN PASSED ON URL BAR
    Get in touch with Support to see if this is the issue and if "yes" get a one-off patch.
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    ---------------------------------------------------------------------------------

  • Non-English characters not displaying correctly - Serious Issue

    My corporate email is on a Lotus Domino server with Lotus Traveler installed.
    I have set my PlayBook (with OS 2) up to syncronize with the corporate email trough Active Sync (see http://alturl.com/qh3nn), which works perfectly.
    I have however noticed that in some emails special non-english characters are displayed correctly but in some emails special non-english characters are displayed as a black diamond with a question mark inside.
    This is of course a serious issue as most non English speaking countries use some special characters.
    When trying to understand this problem how can I analyse the emails and see what character set is being used?
    And of course better; has someone solved this?

    I am having the same problem. Is there any update available?

  • How to retrieve non-english characters from a query

    Hello,
    My apologies if this post is not in its proper place, but I was a bit confused where to add it.
    I'm running a query using SQL Developer on a table which contains several companies names from many different countries, and one of the checks I need to make to ensure data consistency is to search for all rows which the name of company contains special or non-english characters (like ç, ã, ä as example).
    I don't know what can I use to do this. I tried to collate using NLS_SORT but it didn't work.
    Is there someway to select only the rows that contain these special or non-english characters, excluding from the results the rows that only have english characters? Please have in mind that we have many languages in this table.
    The field I would like to make the conditions on is VARCHAR2.
    Please let me know if there is any extra information I should provide you so that you can help me.
    Thank you in advance for the help.
    Regards,
    Luís

    Hi Luis,
    My apologies if this post is not in its proper place, but I was a bit confused where to add it.This is the Forum for the SQL Developer Data Modeler product.
    I suggest you try using the SQL and PL/SQL Forum: PL/SQL
    David

  • Odd number of non-english characters get broken in windows-chrome and ff

    I developed jnlp applet which prints out the user input.
    When I put odd number of non-english characters(eg: chinese), chrome and firefox browser prints out the last character as question mark.
    input : 가
    output : 가��
    I checked on java console that the character is correct.
    It must be bug in communication of applet to chrome browser.
    IE prints out correctly.
    I can resolve the issue by appending white space on applet and remove it on java script.
    Anyone has any clue on the issue?
    Codes are as follows.
    MainApplet.Java
    public class MainApplet extends JApplet implements JSInterface{//, Runnable {
         public int stringOut(String sData) {
              OutData = sData;
              return 0;
    js File
    function TSToolkitRealWrapper ()
         var OutData;
         var OutDataNum;
    var TSToolkit = new TSToolkitRealWrapper();
    var attributes = { id:'TSToolkitReal',code:'tradesign.pkitoolkit.applet.MainApplet', width:100, height:100} ;
    var parameters = {jnlp_href: getContextPath() + '/download/pkitoolkit.jnlp',
                         separate_jvm:true, classloader_cache:false} ;
    TSToolkitRealWrapper.prototype.stringOut=function(str)
              var      nRet = TSToolkitReal.stringOut(str)     ;
              this.OutData= TSToolkitReal.OutData;
              return      nRet;
    HTML
    <SCRIPT language=javascript>
    <!--
    function StringOut(form)
         var data = form.data.value;
         var nRet = 0;
         var base64Data;
         nRet = TSToolkit.stringOut(data);
         if (nRet > 0)
              alert(nRet + " : " + TSToolkit.GetErrorMessage());
         else
              form.data1.value = TSToolkit.OutData;
    -->
    </SCRIPT>
    Edited by: user13496918 on 2013. 3. 20 오후 7:29
    Edited by: user13496918 on 2013. 3. 20 오후 7:39
    Edited by: user13496918 on 2013. 3. 20 오후 9:17
    Edited by: user13496918 on 2013. 3. 20 오후 9:18

    I checked on java console that the character is correct.So it isn't a Java problem.
    It must be bug in communication of applet to chrome browser.So tell the people who make the Chrome browser.
    IE prints out correctly.That's a change. I've just spent nine days tracking down an IE applet problem and I'm not finished yet.
    Please omit the boldface next time. We can read. Boldface doesn't help; it makes it worse.

  • Encoding non english characters with utf 8 on jsp (Critical!!)

    I am inserting hebrew characters from JSP into oracle db and everything is fine until this point. But when I try to retrieve the information from the database, the characters are not displayed properly (I get some garbage characters). I am sure that the data stored in the database is correct, but not sure why there is a problem in displaying the data in the JSP.
    I came across a thread on TSS
    http://www.theserverside.com/discussions/thread.tss?thread_id=28944
    and followed the suggestions given there like having
    <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">and also this
    <%
    //Some JDBC and sql statement query UTF-8 data and then ...
    String str = rs.getString("utf8_data");
    str = new String(str.getBytes("ISO-8859-1"),"UTF-8");
    %>
    <%= str %>Now, the data getting displayed is partly correct, I mean to say, some characters are still coming as squares.
    Any ideas will be of great help.

    even i doubt the database charset for this issue. But what I dont understand is how only certain hebrew characters are getting stored properly and why others are corrupted?
    Also, can anyone let me know how i can view the Non-English characters present in the database directly, as TOAD is not able to display them

  • Only VBA does not recognize non-English characters

    Hello guys,
    I have a new laptop with Windows 8.1 bought in the USA and I'm having a difficulties with Excel VBA (Office 365 University-64x bought in the Czech Republic - Central Europe). The VBA does not recognize non-English characters (particularly "ř" and
    "ů") which causes me problem when running some codes that I wrote earlier on my previous laptop (Windows 7, bought in the Czech Republic with the same Office). 
    The problem with non-English characters has occurred only in VBA so far, otherwise I can use these characters normally in Excel cells, Word... I tried to install both English and Czech version of the Office with no change, I also installed Czech proofreading
    tools and set everything to Czech in the Office. The location and language preferences in the Windows are also set up to Czech. And it is not a problem of a font. I also mentioned that when I tried to look up these characters, using Ctrl+F, it changes
    original ř to r after a search and again this is only an issue of the VBA.   
    Thank you very much for any help.
    Tom

    Hi Tom,
    VBA for Excel can only recognize ASCII code from 0 to 255, if you use other special characters like "ř" or "ů", it will returns 63(?) to you. To use this kind of characters, you have to utilize ChrW function to parse a decemal to the
    character.
    http://msdn.microsoft.com/en-us/library/ee177465.aspx
    for example, the hex code and dec code for these two characters are as below:
      Hex   Dec
    ř 159   345
    ů 016F  367
    So to get these two characters in VBA, you could code as below:
    ChrW(&H159) or ChrW(345)
    ChrW(&H16F) or ChrW(367)
    You can get the hex code of the character by searching in the system character map(in the Win8.1 start view, search "character map"), then convert the hex code to decimal code by yourself.
    Range("A1").Value = ChrW(&H159) & ChrW(&H16F)
    Range("A1").Value = ChrW(345) & ChrW(367)
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • VBA does not recognize non-English characters

    Hello guys,
    I have a new laptop with Windows 8.1 bought in the USA and I'm having a difficulties with Excel VBA (Office 365 University-64x bought in the Czech Republic - Central Europe). The VBA does not recognize non-English characters (particularly "ř" and
    "ů") which causes me problem when running some codes that I wrote earlier on my previous laptop (Windows 7, bought in the Czech Republic with the same Office). 
    The problem with non-English characters has occurred only in VBA so far, otherwise I can use these characters normally in Excel cells, Word... I tried to install both English and Czech version of the Office with no change, I also installed Czech proofreading
    tools and set everything to Czech in the Office. The location and language preferences in the Windows are also set up to Czech. And it is not a problem of a font. I also mentioned that when I tried to look up these characters, using Ctrl+F, it changes
    original ř to r after a search and again this is only an issue of the VBA.   
    Thank you very much for any help.
    Tom

    Hi Tom,
    I would suggest you post the question in the forum of
    Excel for Developers as your query is directly related to VBA. Here we mainly support Office client side issues:
    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=exceldev
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Support issue for non-English characters (in html forms)

    Hi group!
    I just want to post an issue here and see if anyone else has the same problem. First off, Im running Windows XP MCE but the French version (not the english version). This may help find out where the problem really is.
    Second, I know a bit of html and such, and I'm referring to HTML Character entities for this thread, there's a quite complete list here for reference: http://www.faqs.org/docs/htmltut/characterentitiesfamsupp69.html
    I noticed that some, not all, non-English characters written in a textarea (which is, basically, a multi-lined input box) doesnt pass well or at all to the server when sending the form from Safari. Most of the time, the content of the text area is reduced to the beginning and ends where the first accentued character is met.
    The most used French accents (&eacute;, &agrave;) are usually well interpreted (but may, once in a while, produce that bug too) by safari, but &ocirc; and &icirc; doesnt do that well.
    Oddly, this bug doesnt happen all the time and doesnt "crash" in the same manner everytime.
    So I started a thread just to see if there's anyone else having issues with any non-english characters mostly in forms. Probably flash/shockwave does work, but I'm not sure- I have not tested yet.
    Acer Aspire 5044   Windows XP   Turion 1.8GHz, 1Gb SDRam, ATI 200M xpress

    Yes, it is a known issue. I also noticed that it sometimes works, but most of the time it does not. It will hopefully be solved in the future. According to http://www.apple.com/safari/download/ changes that will come include:
    # Support for International users
    # International text input methods
    # Advanced text (contextual forms, international scripts)
    Sony Vaio   Windows XP  

  • Why Rpad does not work in non-English characters...????

    Ηι ,
    I have the classic table of emp in user scott....
    When i insert another row containing non-English characters the rpad function does not work......
    SQL> select ename , rpad(ename,12,'.') from emp;
    ENAME                          RPAD(ENAME,12,'.')
    SMITH                          SMITH.......
    ALLEN                          ALLEN.......
    WARD                           WARD........
    JONES                          JONES.......
    MARTIN                         MARTIN......
    BLAKE                          BLAKE.......
    CLARK                          CLARK.......
    KING                           KING........
    TURNER                         TURNER......
    JAMES                          JAMES.......
    FORD                           FORD........
    MILLER                         MILLER......
    SCOTT                          SCOTT.......
    ADAMS                          ADAMS.......
    ΠΑΝΑΓΙΩΤΟΥ ΠΑΝΑΓΙWhen i convert it to English characters then it works....
    PANAGIOTOU PANAGIOTOU..
    How can i make it to work....????
    I use 10g v.2
    Many thanks...
    Sim

    Hi ,
    SQL> select length('ΠΑΝΑΓΙΩΤΟΥ') from dual;
    LENGTH('ΠΑΝΑΓΙΩΤΟΥ')
                      10
    SQL> select vsize('ΠΑΝΑΓΙΩΤΟΥ') from dual;
    VSIZE('ΠΑΝΑΓΙΩΤΟΥ')
                     20When i issue the command
    SQL> select ename , rpad(ename,25,'.') from emp;
    ENAME                          RPAD(ENAME,25,'.')
    SMITH                          SMITH....................
    ALLEN                          ALLEN....................
    WARD                           WARD.....................
    JONES                          JONES....................
    MARTIN                         MARTIN...................
    BLAKE                          BLAKE....................
    CLARK                          CLARK....................
    KING                           KING.....................
    TURNER                         TURNER...................
    JAMES                          JAMES....................
    FORD                           FORD.....................
    MILLER                         MILLER...................
    SCOTT                          SCOTT....................
    ADAMS                          ADAMS....................
    ΠΑΝΑΓΙΩΤΟΥ                     ΠΑΝΑΓΙΩΤΟΥ.....It worked.... setting as 25 characters for padding.....
    Thanks....for the useful remark
    Sim

  • Cannot see folder- in non english characters.

    I have set up PySDM to mount one of my harddrives on boot. The problem is that I cannot see a folder (ls and nautilus ) there , which is non -english characters (russian). Ubuntu was able to see it properly. I verified it was there by booting back to Windows.

    *vitali* wrote:Ok what should it be?
    UTF-8 maybe (or utf8 I'm never sure which one to use).
    Try mounting it manually and check for errors and if it works as you want.
    Last edited by R00KIE (2009-12-27 12:49:57)

  • Non-english characters in sqlplus

    Friends,
    9.0.1,10.2.0.1
    CAn the non-english characters be displayed in sqlplus prompt?
    I have to print the data with some hindi charcaters like name from the report generated via proc.
    What is teh workaround for this?
    Thanks

    Hi,
    I have RH Linux 7.3.
    Here is my situation.
    I have some tables that have some columns.In these columns i need to store data in hindi.
    The database character set(nls_characterset) is US7ASCII.
    The datatypes of the columns is varchar2 type.
    The tables are accessed through Pro*c and the proc code generates the report.
    The data in these reports needs to be printed out and the corresponding data has to be in hindi.
    So i have to do two things
    1) On query the tables, the user should see hindi data along with english data.
    2) The printed report should also contain hindi data.
    Questions:
    1) If i change the charcater set by the command:
    alter database character set AL32UTF8;
    and OS locale to UTF-8
    Would these chnages solve the purpose?
    2) Or do i need to recreate the database with AL32UTF8 and exp/imp all the data?
    3)Any other advice/option?
    Thanks

  • Non-English characters in URL for rwservlet

    I'm having a problem when I try to use non-english characters in a URL request to generate a report.
    This works fine:
    http://...rwservlet?report=r1.jsp&m1=Fred
    But if I try Fréd (e with accent graph) the report does not return any data even though the SQL by itself would find data.
    I tried UTF-8 encoding
    http://...rwservlet?report=r1.jsp&m1=Fr%C3%A9d
    8859-1 encoding
    http://...rwservlet?report=r1.jsp&m1=Fr%E9d
    Or just spell it out (not sure what that gets encode as):
    http://...rwservlet?report=r1.jsp&m1=Fréd
    But noting works. Any ideas?
    Thanks, Andreas

    Suggestions
    1) Try with NLS_LANG as
    SWEDISH_SWEDEN.WE8DEC
    2) Make a paramform and enter via paramform (unencoded)
    (This is just for testing purpose)
    3) Change machine locale to swedish and try
    4) Which reports version is this ?
    Please see
    BUG 2713695 - NLS CHARACTERS FOR PARAMETERS CHANGE TO QUESTION MARKS WHEN PASSED ON URL BAR
    Get in touch with Support to see if this is the issue and if "yes" get a one-off patch.
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    ---------------------------------------------------------------------------------

  • Formula to show non english characters from clob in crystal report

    Hi
    I am using the database Oracle 11g with a field clob in one of the table that i want to show in the crystal report
    But the problem is when i put the clob field in crystal report it is outputting the results perfectly for English characters but not for the Arabic ones and returning the string like (¿¿¿¿ ¿¿¿¿ ¿¿¿ ¿¿¿¿ ¿¿¿¿ ¿¿¿ ¿ ¿¿¿¿¿ ¿¿¿)
    so is there any way to show the arabic (non english) characters perfectly on crystal report with clob field

    Hi Azeem,
    Make sure the arabic font should install in your system.
    Try this:
    Create a text field in your Crystal Report (a label).
    Place Arabic characters into that field (just by typing them into it on the report definition).
    Run the report. If they display correctly then its probably not Crystal, but rather would point to an issue in the data retrieval and supply to Crystal via your dataset (or whatever datasource you are using).
    If they don't display - then its definitely Crystal.

Maybe you are looking for

  • Issue with parameter in my package

    Hi ! I have a problem and I don't know how resolve it ... and I don't know where searching an answer ... So my problem is that : I create a concurrent program with a parameter : p_type_edition (in lower case) I create a dataTemplate with the paramete

  • Error in Report S_ALR_87013534

    Dear Experts,                      I am having some issue in report S_ALR_87013534.When i generated PR through activity the commitment amount is howing correct in S_ALR_87013542 But in Report S_ALR_87013534 its showing commitmnet divide by 10. i.e if

  • Pdf files opening in acrobat but not ie

    hello all, i'm having a problem opening pdf files in internet explorer instead of acrobat 9.  the "Display PDF in browser" box is checked under Edit > Preferences... and i've opened regedit and watched as bBrowserIntegration registry key is deleted a

  • How to install ojvm in 9.0.3.x for jdk 1.4.x

    I'm trying to use the profiler in Jdev 9.0.3.x. Using jdk 1.4.1_03 the memory profiler option is disabled. Reading from other postings i understand that i need to have my VM set to ovjm. But i cant see that option with this jdk version. any suggestio

  • Configuration - Bank chains?

    Hi Friends, Iam working for US client, I want to make the International payments from 1 Bank to another Bank, for example US to France, for this I have to do Bank chain configuration. (Q1) Configuration for Bank Chains step by step flow? (Q2) What is