author | wenzelm |
Fri, 05 Jul 2024 11:38:21 +0200 | |
changeset 80508 | 8585399f26f6 |
parent 80494 | d1240adc30ce |
permissions | -rw-r--r-- |
64639 | 1 |
/* Title: Pure/General/utf8.scala |
50203 | 2 |
Author: Makarius |
3 |
||
4 |
Variations on UTF-8. |
|
5 |
*/ |
|
6 |
||
7 |
package isabelle |
|
8 |
||
9 |
||
76357
49463aef2ead
tuned signature, following isabelle.setup.Environment;
wenzelm
parents:
76356
diff
changeset
|
10 |
import java.nio.charset.{Charset, StandardCharsets} |
50203 | 11 |
|
12 |
||
75393 | 13 |
object UTF8 { |
76357
49463aef2ead
tuned signature, following isabelle.setup.Environment;
wenzelm
parents:
76356
diff
changeset
|
14 |
val charset: Charset = StandardCharsets.UTF_8 |
50203 | 15 |
|
62527 | 16 |
def bytes(s: String): Array[Byte] = s.getBytes(charset) |
50203 | 17 |
} |