Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Using the following Java program:</p> <pre><code>/* A.java */ class A { public static void main (String[] args) { for (char c = 'A'; c &lt; 270; c++) { System.out.print(c); } System.out.println(); } } </code></pre> <p>then I get the following output:</p> <pre><code> $ java -Dfile.encoding=ASCII A Default Charset: US-ASCII abcdefghijklmnopqrstuvwxyz{|}~?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? $ java -Dfile.encoding=iso-8859-1 A Default Charset: ISO-8859-1 abcdefghijklmnopqrstuvwxyz{|}~��������������������������������������������������������������������������������������������������������������������������������?????????????? $ java -Dfile.encoding=UTF-8 A Default Charset: UTF-8 abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČč $ java A Default Charset: UTF-8 abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿĀāĂ㥹ĆćĈĉĊċČč </code></pre> <p>From the above you can see that ISO-8859-1 prints both '�' and '?'. The '�' means that it was not valid UTF-8, and the terminal could not print it, and the '?' means that Java could not convert the required character into that character set. This is why ASCII only has '?', as it can only convert ASCII characters.</p> <p>The default file.encoding is taken from from your locale, which is why you may need to set your LC_CTYPE. Otherwise, your terminal needs to be set to understand UTF-8.</p> <pre><code>$ echo $LC_CTYPE UTF-8 </code></pre>
    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. 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