codepage

Mapping between Windows code page numbers and encoding_rs character encodings

4 releases

Uses old Rust 2015

0.1.2 Jul 21, 2024
0.1.1 Dec 2, 2018
0.1.0 Dec 2, 2018
0.0.1 May 3, 2018

#91 in Text processing

Download history 17590/week @ 2024-07-01 21918/week @ 2024-07-08 21798/week @ 2024-07-15 23865/week @ 2024-07-22 21974/week @ 2024-07-29 23182/week @ 2024-08-05 27541/week @ 2024-08-12 21061/week @ 2024-08-19 24705/week @ 2024-08-26 23640/week @ 2024-09-02 23120/week @ 2024-09-09 20775/week @ 2024-09-16 22876/week @ 2024-09-23 23730/week @ 2024-09-30 19829/week @ 2024-10-07 23196/week @ 2024-10-14

90,562 downloads per month
Used in 88 crates (9 directly)

Apache-2.0 OR MIT

14KB
195 lines

crates.io docs.rs Apache 2 / MIT dual-licensed

codepage

Mapping between Windows code page identifiers and encoding_rs Encodings.

Why a Separate Crate?

This crate isn't part of encoding_rs itself in order to avoid scope creep for encoding_rs itself and to signal that Windows code page applicability of encoding_rs is secondary. It's not completely incidental due to Web history, but encoding_rs will prioritize compliance with the WHATWG Encoding Standard over matching the Windows system converters exactly. Still, encoding_rs is in practice useful for decoding legacy Windows data, because all the "ANSI code pages" that are the default for some Windows locale are present in the Encoding Standard, because those defaults have influenced the Web.

Version 1.0

Logically this crate should be at version 1.0, but it's not worth the hassle to do a version number semver break when there's no actual API break. The expectation is to do 1.0 when encoding_rs 1.0 comes along.

Licensing

Please see the file named COPYRIGHT.

API Documentation

Generated API documentation is available online.

Security Considerations

Only code page numbers whose corresponding labels map to the replacement encoding in the Encoding Standard map to the replacement encoding here, despite many other code page numbers referring to encodings with similar security problems.

Disclaimer

This is a personal project. It has a Mozilla copyright notice, because it's partially generated by the Python script in the encoding_rs repo. You should not try to read anything more into Mozilla's name appearing.

Release Notes

0.1.2

  • Make the crate no_std.

0.1.1

  • Fix metadata.

0.1.0

Initial non-placeholder release.

Dependencies

~3MB
~119K SLoC