Results 1 to 1 of 1
  1. #1
    Kkloe is offline Member
    Join Date
    Oct 2010
    Posts
    1
    Rep Power
    0

    Default Displaying japanese and other charsets

    Hallo, just for fun I am developing a irc-bot, one of the functions are to display the title of webpages when someone posts a link in the chat, my problem is that links to non-western european charset like Shift_JIS come out as crap, both in the console window and the irc-chat.

    here the code to fetch the title:
    Java | /** * Gets the title of - Anonymous - uwj9aq5L - Pastebin.com

    and here is the code to print it out later:
    Java | public void main() throws - Anonymous - Qxr83n9t - Pastebin.com

    as you would see is that i try to write purly on the console before sending it to the channel, the output I get is like to the console:
    WEB_PAGE_MATCH: CVz[y[W
    LINE_1: CVz?[y?[W
    TEST_1: CVz?[y?[W
    TEST_2: ?C?V???z?[???y?[?W
    TEST_3: ?????[???[?
    TEST_4: ?????????
    TEST_5: ?C?V???z?[???y?[?W
    TEST_6: ?C?V??z?[???y?[?W
    TEST_7: ?C?V???z?[???y?[?W
    TEST_8: CV?z?[??y?[?W
    TEST_9: ?C?V??z?[???y?[?W

    and in the irc, the irc-client i use have utf-8 set as charset

    <Pabulo> CVz?[y?[W 00
    <Pabulo> CVz?[y?[W 01
    <Pabulo> ?C?V???z?[???y?[?W 02
    <Pabulo> ?????[???[? 03
    <Pabulo> ????????? 04
    <Pabulo> ?C?V???z?[???y?[?W 05
    <Pabulo> ?C?V??z?[???y?[?W 06
    <Pabulo> ?C?V???z?[???y?[?W 07
    <Pabulo> CV?z?[??y?[?W 08
    <Pabulo> ?C?V??z?[???y?[?W 09

    I can see when debugging the the string is containing the correct characters(in this case the japanese, well most of them) but when it goes out it comes out as crap.
    Any help would be great.

    Edit: seems like the ide didnt support it, I ported it to netbeans and it works there, bluej that i used before didnt support itseems
    Last edited by Kkloe; 10-04-2010 at 06:31 PM. Reason: solved

Similar Threads

  1. japanese character in jsp page
    By javastuden in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 11-11-2010, 11:29 AM
  2. running a java application on Japanese OS
    By yibingdong in forum Advanced Java
    Replies: 4
    Last Post: 09-09-2009, 10:01 PM
  3. Using freemarker to send an email in Japanese utf-8
    By mackstar in forum New To Java
    Replies: 0
    Last Post: 09-01-2009, 10:49 AM
  4. Displaying Japanese characters in JSP page
    By jmanjunath in forum Advanced Java
    Replies: 1
    Last Post: 09-25-2008, 11:19 AM
  5. Seach with a japanese charecter via get method
    By nimitha in forum New To Java
    Replies: 1
    Last Post: 07-10-2008, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •