Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
sanette committed Dec 24, 2022
1 parent f7caddd commit 31611e0
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 506 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ this library to simplify searching and comparison.
## Example

```ocaml
let nfc = "V\197\169 Ng\225\187\141c Phan";;
let nfc = "V\197\169 Ng\225\187\141c Phan";;
let nfd = "Vu\204\131 Ngo\204\163c Phan";;
print_endline nfc;;
print_endline nfc;;
Vũ Ngọc Phan
print_endline nfd;;
print_endline nfd;;
Vũ Ngọc Phan
Ubase.from_utf8 nfc;;
- : string = "Vu Ngoc Phan"
Ubase.from_utf8 nfd;;
Ubase.from_utf8 nfd;;
- : string = "Vu Ngoc Phan"
```

Expand All @@ -42,7 +42,7 @@ val from_utf8 : ?malformed:string -> ?strip:string -> string -> string
contain only ASCII characters. *)
```

If your accented string is encoded in isolatin, you first have to
If your accented string is encoded in isolatin (8859-1), you first have to
convert it to utf8 using `isolatin_to_utf8 mystring`.


Expand All @@ -52,7 +52,7 @@ convert it to utf8 using `isolatin_to_utf8 mystring`.
```
opam install ubase
```
That's it!
That's it!

If you prefer to build a local version, download the repository, move
into the `ubase` directory, and
Expand Down Expand Up @@ -84,16 +84,14 @@ program from a terminal
$ ubase Déjà vu !
Deja vu !
$ ubase "et grønt træ"
et gront trae
$ ubase "Bøǹĵöůɍ"
Bonjour
$ ubase Anh xin lỗi các em bé vì đã đề tặng cuốn sách này cho một ông người lớn.
Anh xin loi cac em be vi da de tang cuon sach nay cho mot ong nguoi lon.
```

(Notice that the quotes "" are not required)

## Doc

Documentation and API are available
Expand Down
Loading

0 comments on commit 31611e0

Please sign in to comment.