Japanese Character Display

Sorry for such a newbie question.
My program reads in a UTF-8 file containing some Japanese characters, stores them into a String variable and then attempts to print using: System.out.println(myString); . However, it doesn't display correctly in XCode or the Terminal (shows mostly question marks). When I follow it in the debugger, the Japanese characters show up correctly stored in the variable. Also, if I just do: System.out.println("japaneseCharacters"); where japaneseCharacters are actual japaneseCharacters, they print out correctly. I've made sure that my source files, the file being read in, and the terminal are both set to UTF-8. Can somebody point me in the right direction?
Thanks!

I believe yours is a application specific or platform specific problem.
when you write a code:
System.out.println("japaneseCharacters");what tool did you use? What is the locale setting of your platform?.
On our Linux platform, locale is ja_JP.UTF-8. So we need explicit charset argument
for encodings other than Japanese/UTF8 in using Java API classes and methods.
As many applications including editors rely on the locale ja_JP.UTF-8, we need special
configuration for handling other encodings as EUC-JP or Shift_JIS.

Similar Messages

  • Japanese Character Display Problem

    It seems like the new JRE does not allow Japanese characters to be displayed on anything but the title bar of an application when running on a US English XP SP2 system with all of the proper language support installed.
    I can see the Japanese Characters in the title bar, but in the rest of the application, they appear as outlined blocks. All of the text is coming from the same resource bundle so I know that it is loading correctly because it appears in the title bar correctly.
    On a Japanese system with XP SP2, everything works as expected. Is there anything that I can do to correct this? I am using JRE 1.4.2 to compile the application, and the latest JRE to display it.
    Any help would be greatly appreciated.
    -Steve

    HI out there,
    i'm having similiar problems when trying to parse / transform a database-generated xml-string containing Japanese characters into an html using a saved xsl file. I've tried zillions of ways (got from specialized forums) to do it getting hardly the same result all the time.
    Now the point is that i'm getting the known-by-all "???" characters
    but i've checked that the xml string is Genereted correctly from
    the database using in my JSP page:
    String aux = new String(TXT_FROM_DATABASE.getBytes("ISO-8859-1"), "UTF-8");...
    then the JSP sets
      request.setCharacterEncoding("UTF-8"); (not necessary i guess)
       response.setContentType( "text/html; charset=UTF-8" ); and calls a function XML2HTML (from a *.class) that makes necessary
    operations to call the transformer.transform method:
    // auxiliary function to convert the string into UTF-8 (to ensure)
    // has been tested that when calling to xml2html the String xml_string
    // is correctly formed and does contain all japanese characters (all)
    public static String convertString(String s, PrintWriter pw_out) {
           try{
             if(s == null) return s;
             String aux = "";
             byte[] bari = s.getBytes("ISO-8859-1");
             aux = new String(bari, "UTF-8");
             return aux;
           }catch (Exception e){
             pw_out.print(e.getMessage());
             return "";
      public static void XML2HTML(String xml_string, String xsl_file, ServletRequest req,
          ServletResponse res) {
          PrintWriter p_out=null ;
          String appdir = req.getRealPath("/"); 
          try{
            p_out = res.getWriter(); 
          } catch (Exception ioException){
            System.out.print(ioException.toString());
          // transformating ...
          try {
          // Creating the transformer object from the XSLT_file
          javax.xml.transform.stream.StreamSource xslFile  = new StreamSource(new File(appdir+"\\"+xsl_file+".xsl"));
          javax.xml.transform.TransformerFactory factory = TransformerFactory.newInstance();
          javax.xml.transform.Transformer transformer = factory.newTransformer(xslFile);
          transformer.setOutputProperty(javax.xml.transform.OutputKeys.ENCODING,"UTF-8");
          transformer.setOutputProperty(javax.xml.transform.OutputKeys.INDENT,"yes");
          transformer.setOutputProperty(javax.xml.transform.OutputKeys.METHOD,"html");
         // create the source Stream
          String xmldata = convertString(xml_string,p_out);
          StringReader xml_sr = new StringReader(xmldata);
          StreamSource xml_source = new StreamSource(xml_sr);
          // result Stream
          javax.xml.transform.stream.StreamResult outResult = new javax.xml.transform.stream.StreamResult(p_out);
           //calling the transform method !! (source/result)
          transformer.transform(xml_source,outResul
          } catch (Exception e){
            p_out.print ("<br/>EXCEPTION__" + e.toString());
            p_out.print ("<br/>CAUSE" + e.getCause());
            p_out.print ("<br/>nMSG" + ((TransformerException)e).getMessageAndLocation());
    } and my XSL DOES contain these lines at the very beginning:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" encoding="UTF-8" media-type="text/html; charset=UTF-8"/>more:
    * all my files are saved as UTF-8
    what makes me go crazy:
    * In the jsp after the call to the xml2html method i've written
    <%=xml_string%> and it does write "????" characters for all elements
    except for one of them (japanese word that i wrote out directly in japanese,
    but if in the jsp page i INCLUDE
      <%@page language="java" pageEncoding="utf8" contentType="text/html; charset=UTF8"%>
    THEN THIS only written-out element in japanese is not displayed correctly either.
    and even MORE !
    if in the xsl file i include:
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      </head> it does not display it correctly neither...
    is this possible ?
    may the problem be that the function i'm calling is in a *.class ?
    please help (i've been working around for days now)
    my work enviroment is
    eclipse (project set to utf-8 encoding)
    wsas 5.0
    jdk 1.4
    thank you for your time
    and nice day to you all!!
    gREEtings from malaga (spain)

  • Japanese character is not displaying properly in JDialog

    Hi All,
    Japanese character are shown in parent window but not displaying properly JDialog window.
    Even JDialog Title bar is showing in Japanese properly but JLabel's and JButton text are not showing properly in Japanese.
    Anybody knows why Japanese characters are not showing properly in JLabel and JButton of JDialog window.
    Thanks,
    -Mani

    Specified font on that objects, that's why Japanese character doesn't shown.

  • Problem displaying japanese character set in shopping cart smartform

    Hi All,
    whenever users are entering some text in Japanese character set while creating a shopping cart in SRM, the smartform print output is displaying some junk characters!! even though the system is unicode compatable, did any one have problem ??
    Thanks.

    Hi,
    May be there is some problem with UNICODE conversion.
    See the foll links;
    Note 548016 - Conversion to Unicode
    http://help.sap.com/saphelp_srm50/helpdata/en/9f/fdd13fa69a4921e10000000a1550b0/frameset.htm
    Europe Languages  work  in  Non- Unicode  System
    Re: Multiple Backends
    Re: Language issue
    Standard Code Pages in Non-Unicode System
    Re: Upgrade from EBP 4.0 to SRM 5.0
    http://help.sap.com/saphelp_srm50/helpdata/en/e9/c4cc9b03a422428603643ad3e8a5aa/content.htm
    http://help.sap.com/saphelp_srm50/helpdata/en/11/395542785de64885c4e84023d93d93/content.htm
    BR,
    Disha.
    Do reward points for  useful answers.

  • How to Display Japanese character in Crystal Report 8.5

    Hi,
    I've some data stored in japanese language in sql server 2005 database using nvarchar datatype.
    When i execute store proc in sql server, it's showing japanese character properly in sql server. However, when i'm trying to display data in crystal report 8.5, it's showing ????? character.
    I've tried to change font to 'Arial Unicode MS (Japanese)',MS Gothic, MS UI Gothic, MS Mincho (Japanese) as per the search result available in  google. But not had any luck.
    Can anyone please provide any solution for this?
    Many Thanks.
    Kaushal

    when i tried to open below link
    https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/bobj_download/main.htm
    It's not opening & displaying access denied message as below.
    403 Access denied
    You do not have the permissions to access this resource
    Error is logged with Tag:
    Just want to know, Is it possible to display japanese characters on report using crystal report 8.5?
    We've constraint to use only CR 8.5
    Regds,
    Kaushal

  • HT4059 ios 6 ibooks app can not display japanese character

    After update to the new ios 6 , when i open my ibooks app the japanese character has disappered. is there any help?

    Are you talking about pdf?  If so, see
    https://discussions.apple.com/thread/4318822
    If you are talking about epubs, what is the title of the book?

  • Some japanese character encoded to "?". Please help me..

    My system is below listed.
    J2SE 1.4.1
    MySql Ver 11.18 Distrib 3.23.52,
    Resin 2.1.4
    Java application load html document encoded 'SHIFT_JIS' using HtmlURLConnection.
    And read the document in 'SHIFT_JIS'.
    Almost it appears properly but some of characters printed in '?'.
    hm....
    I will show my source code.
    private String readDocument(URL url) {
    String METHOD_NM = ".readDocument()";
    try {
    HttpURLConnection URLCon = (HttpURLConnection)url.openConnection();
    BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream(), "SJIS"));
    String inputLine;
    On my web server, input the character(printed '?') on textbox in IE6(japanese language pack). and submit. then the character translated the code(ex> #4575; )
    The code inserted DB. select from DB the tuple.
    and display the IE6. it's ok.
    but loaded from japanese html. It's inserted to DB '?'.
    and displayed '?' on IE6.
    I want to translate the character to code(ex> #5455;).
    OK?
    Please reply...
    p.s I'm sorry my poor english..

    Thank you for reply.
    but I've already tried that.
    I have tried all japanese encoding of "Supported Encodings" from java.
    http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html
    I want to convert that.
    ex)
    ?fe? => & # 4532; fe & # 3456; => original charcater is removed blank
    This is convert '?' to code number.
    In this case '?' is Japanese character.
    Please let me know the way..

  • Japanese character

    Hi All,
    Is there is any way to display the japanese character in the application.We have made a smart sync application which is working fine for English language but when we use the application for Japanese user for japanese data..the data is coming in garbage form like "•É“ìŽs–¯•a‰@ "  what settings needs to be done either in mobileengine config file or on to the server side to enable the support for unicode characters on to the client.
    The MI server configuration
    a) Operation system version – AIX
    b) OS 32 bit or 64 bit? – 64 bit
    c) Unicode or Non-Unicode – Unicode
    R/3 one SAP system configuration
    a) Operation system version – AIX
    b) OS 32 bit or 64 bit? – 64 bit
    c) Unicode or Non-Unicode – Non Unicode
    Thanks in advance.
    Regards
    Devendra kumar

    Hi Devendra
        Have you used the Multi Language Feature made available with MI 2.5 SP18 or MI7.0 SPS09? Please refer to the note 1029594 for more information on this. If no, then request to you implemente this feature.  If yes, I feel the problem you are facing is directly related to you backend being a Non Unicode system and MI Server being a Unicode system. If you read the word document attached to the note mentioned, there is an indication referring to such a combination <i><b>In a Multi language scenario, if the backend is Unicode based then the middleware must also be Unicode based. The Unicode languages get converted to junk characters when they are transferred from the backend to the middleware. In such scenarios replication may fail or data may not get downloaded to the client</b></i>. Just FYI, Please refer to the replies in thread Re: Unicode to Japanese characters which might be useful to you.
    Best Regards
    Sivakumar

  • Japanese character in WLS7.0

    Hello,everyone:
    I got such a problem,It's about japanese character in WLS7.0.
    Let me describe my envirment first,
    OS:windows 2000 pro (japanese)
    WLS:Weblogic Sever 7.0 (english)
    When i write in a japanese character in a form contained by a jsp
    webpage,then submit
    this form to WLS7.0,the Weblogic server should display the character
    originally,but the
    return value is confusion.
    alternatively,when i submit this form to weblogic server 6.1,the
    original and return value
    is the same.
    Does the Weblogic Server 7.0 english version not support Japanese
    character inputting?
    thank you for readding!
    liu gang

    I am using Oracle OC4J Standalong Server v10.1.3.
    Its kind of weird because after I have successfully logged in, the japanese characters are correctly displayed. It is only at the login page that the header text displays improperly. Below shows the details:
    header-layout.jsp (this is the jsp that has a problem in the display)
    before login:
    login.jsp ---> this imports the header-layout.jsp. other japanese texts within the login.jsp file are correctly displayed but the japanese text in the header-layout.jsp is not properly displayed.
    after login:
    list.jsp --> this uses the same header-layout.jsp but specifies it using tiles-defs.xml

  • Japanese character appear rotated when applying a Formula on the field

    We have a problem where the japanese character appear well on the report when
    simply drag and drop a field that contained japanese data from the database
    BUT it display the japanese character rotated horizontally when we apply a simple
    formula on it. The formula don't change any style or rotation.
    I think it's a bug. Is anyone had this problem before?

    we are using BO XI release 1 SP4 and the application use these components.
    but I also created a small project with the Visual Studio 2008 with the latest crystal report 2008 embedded components and both return the same result.
    Japanese character appear well but (each character are rotated 90 degrees) on the field where a formula field is set and my formula don't do nothing except setting the field itself :
    Here is the formula:
    formula = {buyer_index_alphabetical_FR;1.alt1name}
    alt1name is a field that contain japanese
    and the field data appear well on the report but with each character rotated.
    if we map on a textfield, the field alt1name directly without this formula
    the text appear normally
    I didn't use formatting formulas
    that 's why my conclusion is that it's a bug.
    But I am surprised that nobodyelse mentioned that.

  • Problem while uploading Japanese character to application server

    Hi Experts,
    I have a text file which contains Japanese character. when i try uploading the file directly to application server using tcode CG3Z the Japanese characters are getting replaced with some symbols. But when i read the text file using GUI_UPLOAD and then write it back to the application server japanese characters are getting displayed. what could be the issue here? how this can be resolved?
    warm regards,
    abdul hakim

    In case of CG3Z, internally there is a call to the FM 'C13Z_FILE_UPLOAD_ASCII' where you'll see this statement:
    * open dataset for writing
      OPEN DATASET i_file_appl FOR OUTPUT MESSAGE e_os_message
                   IN TEXT MODE ENCODING NON-UNICODE.
    Please note the ENCODING addition is set to NON-UNICODE. But in your custom code you must be using ENCODING DEFAULT which sets the encoding to UTF-8 format because of which the Japanese characters are represented correctly.
    Hope this helps.
    BR,
    Suhas

  • Terminal doesn't show Japanese character

    Hi everyone,
    I've been having a really strange problem lately..Maybe it was there all the time and never noticed it.
    I use a lot my terminal and I have some file named with japanese character, everything is fine in the Finder but in my terminal, they show as spaces.
    Which means, they just cannot be displayed BUT they are read... If I copy/paste theses blanks in TextEdit, I see my japanese character perfectly well.
    I use the Monaco font so I don't think it's a font issue and my locale are en_US.UTF8 !
    For the record : iTerm doesn't have this issue.
    Somebody have any issue ?

    "Monaco" font should work, but try using "Osaka-regular-Mono".
    There was a similar report a few weeks ago:
    [10.6 Terminal.app doesn't show complex characters|http://discussions.apple.com/thread.jspa?messageID=10107040&#1010704 0]
    So it's not only you having the problem, but my Terminal.app (iMac, 10.6.1) displays Japanese characters without problem, and I have no idea what is wrong with your Terminal. If "Monaco" font is used then "Hiragino Kaku Gothic" (HiraKakuProN-W3) is substituted for Japanese characters.
    I did clean install of 10.6. Did you upgrade from 10.5.x? I think you may send a bug report/feedback to Apple.

  • Japanese Character for Windows XP Home

    I and sure that this is already answer many times, but i can't seem to find anything through searches. I went to regional and language option in control panel in order to check both complest script and east asian. But the some songs still appear gibberish. How can I display japanese character properly since i have lots of japanese songs on my iTunes? Thanks

    I went to regional and language option in control
    panel in order to check both complest script and
    east asian. But the some songs still appear
    gibberish.
    The ID3 tags have to be in the right encoding (unicode). See if this note helps:
    http://homepage.mac.com/thgewecke/mlingos9.html#itunes

  • Offsetting String which contains Japanese Character. In the smartform

    Hi,
    I am having a problem with Japanese Character.
    +ycomment(132) type c.+
    +ycomment receives text from read text FM.+
    +clear V_CHAR52.+
    +V_CHAR52 = ycomment(52).+
    Here are the scenarios.
    * ycomment
       = Pooulated in Japanese testing testing testing by Lore testing testing
      v_char52(displayed in form)   
       = Pooulated in Japanese testing testing testing by Lor
    * ycomment
      =  u308Fu305Fu304Fu306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067u3059u79C1u306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067u3059u308Fu305Fu304Fu306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067
      v_char52(displayed in form)
      = u308Fu305Fu304Fu306Eu540Du524Du306Fu5C0Fu5C71u5FB3u9053u3067u3059u79C1u306Eu540Du5C0Fu524Du5C71u306Fu5FB3u5C0Fu9053u5C71u3067u5FB3u9053u3067u3059u308Fu305Fu304Fu306Eu540Du524Du306F

    hi
    this will give you clear picture about Byte processing and Character processing.
    in case of byte processing
    DATA : test TYPE X LENGTH 16,       " here check length only 16
                test1 TYPE Xstring.
    test = '000102030405060708090A0B0C0D0E0F'.  " but here passing string of 32
    test1 = '00537'.
    IF test byte-ca test1.
    WRITE : test.
    ENDIF.
    In case of Char-String processing
    DATA : test TYPE c LENGTH 32,       " here check length only 32
                test1 TYPE string.
    test = '000102030405060708090A0B0C0D0E0F'.  " but here passing string of 32
    test1 = '00537'.
    IF test ca test1.
    WRITE : test.
    ENDIF.
    may be this comparison is helpfull for you.

  • Apps displyaing Chinese/japanese character

    Hi
    For some odd reason, Yahoo IM and Sofware Update Window are being displayed using non-English charracter. I believe it is Japanese character set.
    have anyone else experience this problem and got any idea on how to fix?
    Thanks

    For some odd reason, Yahoo IM and Sofware Update
    Window are being displayed using non-English
    charracter. I believe it is Japanese character set.
    Most likely it's not Japanese but fractions. Get rid of the font Helvetica Fractions if you have it. Send a screenshot if you want verification (tom at bluesky dot org).

Maybe you are looking for

  • Justification for using HashMap and not ArrayList

    Hi, I've recently completed a project for my course and now I'm doing the write up for it. Part of my project was to load a dictionary into a data structure. I went with a HashMap because I had code from a previous project to help implement it, the d

  • IPhone Cable....(dangerous?)

    Is anyone else having this problem with their iPhone cable? The wires are starting to show on mine and I don't really move my syncing port that much, only when I travel, I roll up the cable. Is this dangerous?

  • Premiere Pro CS6 and h.264, something is wrong?

    Hi there, I've had huge problems with h.264 and adobe premiere pro. Basically I record footage using the Logitech C920 webcam, which converts on the fly to h.264. The problem I am having is when I transfer this over to adobe premiere pro, there seems

  • Appliance purchase/delivery nightmare

      I was shopping for appliances and comparison shopping.  A salesperson approached us and we were given a printed quote for the appliances we wanted.  We said we were out comparison shopping and would come back if we found this to be the best we coul

  • Two SCM Systems connected to one ERP System

    Hello Experts, Here again I got a doubt. Is it technically possible to connect two SCM Systems via CIF to one ERP System? Because I heard that we could connect more than one ERP System to one SCM System, but not vice versa. If you have seen a system