File: documentation.md

package info (click to toggle)
rust-codepage-437 0.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 332 kB
  • sloc: makefile: 4
file content (25 lines) | stat: -rw-r--r-- 754 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cp437 [with wingdings](https://en.wikipedia.org/wiki/Code_page_437#Character_set), as seen on Wikipedia.

Contains wingdings in the `'\x00'..'\x20'` area.

The decode table is additionally enriched from the the [variant table](https://en.wikipedia.org/wiki/Code_page_437#Notes).

# Examples

Decoding:

```rust
# use codepage_437::CP437_WINGDINGS;
assert_eq!(CP437_WINGDINGS.decode(0x41), 'A');
assert_eq!(CP437_WINGDINGS.decode(0x02), '☻');  // BLACK SMILING FACE
```

Encoding:

```rust
# use codepage_437::CP437_WINGDINGS;
assert_eq!(CP437_WINGDINGS.encode('A'), Some(0x41));
assert_eq!(CP437_WINGDINGS.encode('☻'), Some(0x02));  // BLACK SMILING FACE

assert_eq!(CP437_WINGDINGS.encode('ź'), None);        // LATIN SMALL LETTER Z WITH ACUTE
```