Gowrishankar

Members
  • Content count

    4
  • Joined

  • Last visited

Posts posted by Gowrishankar


  1. Hi,

    After some try we got it working. below code works fine.

     

    response.setContentType("text/xml; characterset=utf-8");
    response.setCharacterEncoding("UTF-8");
    OutputStream outs = response.getOutputStream();
    outs.write( new byte[]{(byte)0xEF, (byte)0xBB, (byte)0xBF} );
    
    
    outs.write(xmlDoc.getBytes("UTF-8"));
    
    
    outs.flush();
    

     

    Apart from putting

    outs.write( new byte[]{(byte)0xEF, (byte)0xBB, (byte)0xBF} ); 

    as mentioned in fusion code sample (thanks to Angshu for the link), need to mention "UTF-8" for the getBytes() method.

    It worked fine after that.


  2. Hi,

    Follwoing is the code I used for showing Japanese Chnaracters in Fusionchart. (My XML contains Japanese characters)

     

     

    OutputStream out = response.getOutputStream();
    outs.write( new byte[]{(byte)0xEF, (byte)0xBB, (byte)0xBF} );
    out.write(xmlDoc.getBytes());
    out.flush();
    out.close();

     

     

    Also Tried follwoign one

    PrintStream ps = new PrintStream(response.getOutputStream(), true, "UTF-8"); 
    ps.print(new byte[]{(byte)0xEF, (byte)0xBB, (byte)0xBF});
    ps.println(xmlDoc);
    ps.close();

     

     

    for these 2 code the result is coming as the "pict1.jsp" chart.

     

    Now I tried in stanalone HTML file using ASCII code for the japanese characters (amp;#24215;amp;#33303; is correspondind ASCII code for my Japanese character).

    This gives me the "pict2.jsp" chart

     

    In both the cases the actual japanese character is not showing.

     

    please advice me further for fixing this issue.

    post-24522-0-66157800-1323773189_thumb.jpg

    post-24522-0-73135300-1323773202_thumb.jpg