UTF-8 encode and decode: Difference between revisions
Content added Content deleted
Line 340: | Line 340: | ||
requires only 1 to 4 bytes. |
requires only 1 to 4 bytes. |
||
What is remarkable about the following rather lengthy code is |
What is remarkable about the following rather lengthy code is its |
||
use of proofs of what is and what is not valid UTF-8. Much of what |
use of proofs of what is and what is not valid UTF-8. Much of what |
||
follows is proofs rather than executable code. It seemed simpler to |
follows is proofs rather than executable code. It seemed simpler to |
||
"mostly copy" my old code, than to try to pare that code down to a |
"mostly copy" my old code, than to try to pare that code down to a |
||
minimum that still demonstrated some of what makes ATS different |
minimum that still demonstrated some of what makes ATS different |
||
from all but a few other languages. |
from all but a few (if any) other languages. |
||
*) |
*) |
||
Line 2,114: | Line 2,114: | ||
<pre>$ patscc -O2 utf8_encoding.dats && ./a.out |
<pre>$ patscc -O2 utf8_encoding.dats && ./a.out |
||
SUCCESS</pre> |
SUCCESS</pre> |
||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |