Results 1 to 2 of 2
  1. #1
    Pojahn_M's Avatar
    Pojahn_M is offline Senior Member
    Join Date
    Mar 2011
    Location
    Sweden
    Posts
    197
    Rep Power
    4

    Default "unmappable character for encoding Cp1252"

    Lets say I want to use a characters that is not in the ANSI list. How do I do? I get errors like this:

    Java Code:
    D:\˜”°º•„  A N N A T „•º°”˜¨\Java\Pojahns.java:15: error: unmappable character for encoding Cp1252
    		char ch = '?';
    		           ^
    1 error
    
    Tool completed with exit code 1

  2. #2
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,350
    Blog Entries
    7
    Rep Power
    20

    Default Re: "unmappable character for encoding Cp1252"

    Use a unicode escape sequence '\uxxxx'.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Error: "Invalid character constant"
    By Turk80 in forum New To Java
    Replies: 3
    Last Post: 04-06-2011, 08:53 AM
  2. Replies: 3
    Last Post: 03-03-2010, 12:23 AM
  3. Replies: 1
    Last Post: 01-21-2010, 09:20 AM
  4. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 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
  •