Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>String s = "HANDICAP╔ES"; System.out.println(new String(s.getBytes("CP850"), "ISO-8859-1")); // HANDICAPÉES </code></pre> <p>This shows the correct string value. This means that it was <em>originally</em> encoded/decoded with <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1" rel="nofollow noreferrer">ISO-8859-1</a> and then <em>incorrectly</em> encoded with <a href="http://en.wikipedia.org/wiki/Code_page_850" rel="nofollow noreferrer">CP850</a> (originally <a href="http://en.wikipedia.org/wiki/Windows-1252" rel="nofollow noreferrer">CP1252</a> a.k.a. Windows ANSI as pointed in a comment is indeed also possible since the <code>É</code> has the same codepoint there as in ISO-8859-1).</p> <p>Align your environment and binary pipelines to use all the one and same character encoding. You can't and shouldn't convert between them. You would risk losing information in the non-<a href="http://en.wikipedia.org/wiki/ASCII" rel="nofollow noreferrer">ASCII</a> range that way.</p> <p>Note: do NOT use the above code snippet to "fix" the problem! That would not be the right solution.</p> <hr> <p><strong>Update</strong>: you are apparently still struggling with the problem. I'll repeat the important parts of the answer:</p> <ol> <li><p>Align your environment and binary pipelines to use <strong>all</strong> the <em>one</em> and <em>same</em> character encoding.</p></li> <li><p>You can <strong>not</strong> and should <strong>not</strong> convert between them. You would risk <em>losing</em> information in the non-<a href="http://en.wikipedia.org/wiki/ASCII" rel="nofollow noreferrer">ASCII</a> range that way.</p></li> <li><p>Do <strong>NOT</strong> use the above code snippet to "fix" the problem! That would not be the <em>right</em> solution.</p></li> </ol> <p>To fix the problem you need to choose character encoding X which you'd like to use throughout the entire application. I suggest <code>UTF-8</code>. Update MS Access to use encoding X. Update your development environment to use encoding X. Update the <code>java.io</code> readers and writers in your code to use encoding X. Update your editor to read/write files with encoding X. Update the application's user interface to use encoding X. Do <strong>not</strong> use Y or Z or whatever at some step. If the characters are <em>already</em> corrupted in some datastore (MS Access, files, etc), then you need to fix it by manually replacing the characters right there in the datastore. Do not use Java for this.</p> <p>If you're actually using the "command prompt" as user interface, then you're actually lost. It doesn't support UTF-8. As suggested in the comments and in the article linked in the comments, you need to create a <a href="http://java.sun.com/docs/books/tutorial/uiswing/" rel="nofollow noreferrer">Swing</a> application instead of relying on the restricted command prompt environment.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload