Results 1 to 3 of 3
  1. #1
    BeholdMyGlory is offline Member
    Join Date
    Dec 2008
    Rep Power

    Default Character encoding in Java (Linux to Windows)

    Since I'm from Sweden, I use the swedish letters , and a lot in my Java applications. And since I'm on linux, using UTF-8, those letters get quite screwed up on Windows.

    So how can I set the default character encoding to UTF-8 in my applications? Or does something like htmls å, ä and ö exist in Java?

  2. #2
    Nicholas Jordan's Avatar
    Nicholas Jordan is offline Senior Member
    Join Date
    Jun 2008
    Rep Power


    I worked on this for about ten minutes, did not find much but the general area is somewhere in "java.nio.charset.CharsetDecoder"
    Introduction to Programming Using Java.
    Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    Java uses UTF-16 internally, so it should handle your character set fine by itself.

    UTF-8 certainly will not work; in fact, you will lose your characters.

    Java allows you to set the locale, I suggest looking into that as a start. The locale will choose an appropriate character set and integrate with the OS.

    Also, make sure the OS locale is set correctly.

Similar Threads

  1. Replies: 6
    Last Post: 04-08-2009, 04:05 AM
  2. How to specify character encoding in JavaMail?
    By jfcup in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 10-24-2008, 07:55 PM
  3. Access Linux shared folder from Windows OS
    By nitinpjairaj in forum Networking
    Replies: 3
    Last Post: 08-26-2008, 06:14 PM
  4. reading text character by character
    By bugger in forum New To Java
    Replies: 2
    Last Post: 11-09-2007, 08:54 PM
  5. Linux and java
    By Alan in forum Advanced Java
    Replies: 2
    Last Post: 05-31-2007, 02:30 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