Results 1 to 3 of 3
  1. #1
    Phenomena is offline Member
    Join Date
    Apr 2010
    Posts
    6
    Rep Power
    0

    Default Scanner reading accented characters

    I'm using scanner to fill a JTextArea with the content of a file.

    "Telåsh", -- [1]
    ^^ A line from the file, not going to quote the entire thing its over a 1000 lines lol, my scanner is reading it as

    Telåsh
    It's being read as that. :(

    Any idea how to fix this?

    edit: oh wow, that was easy to fix.
    Last edited by Phenomena; 04-29-2010 at 05:34 AM.

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    765
    Rep Power
    6

    Default

    what type of file it is?
    Ramya:cool:

  3. #3
    Phenomena is offline Member
    Join Date
    Apr 2010
    Posts
    6
    Rep Power
    0

    Default

    .lua, but I got it working. All I had to do was change the scanner charset :o lol

Similar Threads

  1. Reading characters without showing up on the screen?
    By alexsb92 in forum New To Java
    Replies: 11
    Last Post: 03-28-2010, 08:08 PM
  2. Replies: 5
    Last Post: 08-21-2009, 11:03 AM
  3. writing and reading unicode characters from a file
    By ranoosh in forum Advanced Java
    Replies: 4
    Last Post: 09-28-2008, 04:34 AM
  4. Reading pattern using Scanner class
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-18-2008, 12:02 PM
  5. Reading a line from console using Scanner class
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-18-2008, 11:52 AM

Posting Permissions

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