15 lines
533 B
Plaintext
15 lines
533 B
Plaintext
fansh> c := "møøse"
|
|
møøse
|
|
fansh> c.toBuf.size // find the byte length of the string in default (UTF8) encoding
|
|
7
|
|
fansh> c.toBuf.toHex // display UTF8 representation
|
|
6dc3b8c3b87365
|
|
fansh> c.toBuf(Charset.utf16LE).size // byte length in UTF16 little-endian
|
|
10
|
|
fansh> c.toBuf(Charset.utf16LE).toHex // display as UTF16 little-endian
|
|
6d00f800f80073006500
|
|
fansh> c.toBuf(Charset.utf16BE).size // byte length in UTF16 big-endian
|
|
10
|
|
fansh> c.toBuf(Charset.utf16BE).toHex // display as UTF16 big-endian
|
|
006d00f800f800730065
|