Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
import encoding.hex
|
||||
fn decode(s string) ?[]u8 {
|
||||
return hex.decode(s)
|
||||
}
|
||||
|
||||
fn main() {
|
||||
println("${'Char':-7} ${'Unicode':7}\tUTF-8 encoded\tDecoded")
|
||||
for codepoint in [`A`, `ö`, `Ж`, `€`, `𝄞`] {
|
||||
encoded := codepoint.bytes().hex()
|
||||
decoded := decode(encoded)?
|
||||
println("${codepoint:-7} U+${codepoint:04X}\t${encoded:-12}\t${decoded.bytestr()}")
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue