19 lines
502 B
Markdown
19 lines
502 B
Markdown
|
# ppx\_unicode
|
||
|
|
||
|
this is an opinionated unicode PPX for ocaml
|
||
|
|
||
|
features
|
||
|
- all bare string literals are enforced UTF-8, and normalized using NFC. this is similar to
|
||
|
<https://github.com/dbuenzli/ppx_utf8_lit>, however this PPX aims for a modern implementation
|
||
|
based on `ppxlib` and defaults to enforced and normalized UTF-8 on all strings
|
||
|
- `Uchar.t` literals:
|
||
|
```ocaml
|
||
|
# "å"[@uchar]
|
||
|
- : Uchar.t = <abstr>
|
||
|
```
|
||
|
- `bytes` literals
|
||
|
```ocaml
|
||
|
# "å"[@bytes]
|
||
|
- : bytes = Bytes.of_string "\195\165"
|
||
|
```
|