https://github.com/the-ticking-clockwork/mutf-8
An implementation of a Modified UTF-8 encoder and decoder in Nim!
https://github.com/the-ticking-clockwork/mutf-8
charset decoding encoding modified-utf8 mutf-8 mutf8
Last synced: 3 months ago
JSON representation
An implementation of a Modified UTF-8 encoder and decoder in Nim!
- Host: GitHub
- URL: https://github.com/the-ticking-clockwork/mutf-8
- Owner: The-Ticking-Clockwork
- Created: 2024-02-03T13:24:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-03T13:45:51.000Z (over 1 year ago)
- Last Synced: 2025-02-21T13:15:26.052Z (3 months ago)
- Topics: charset, decoding, encoding, modified-utf8, mutf-8, mutf8
- Language: Nim
- Homepage: https://the-ticking-clockwork.github.io/MUTF-8/
- Size: 3.91 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MUTF-8
An implementation of the Modified UTF-8 encoder and decoder from Java,
meant for use within [TagForge](https://github.com/Nimberite-Development/TagForge-Nim),
an NBT parser and dumper!## Usage
```nim
import mutf8assert decodeMutf8([0xE3.byte, 0x81, 0x82]) == "あ"
assert encodeMutf8("Hello☆") == [0x48.byte, 0x65, 0x6c, 0x6c, 0x6f, 0xe2, 0x98, 0x86]
```