mostly passing

This commit is contained in:
Henry Schimke
2022-09-26 16:56:28 -05:00
parent 2754ee4e58
commit 75330fbf23
8 changed files with 430 additions and 374 deletions

View File

@@ -2537,7 +2537,12 @@ impl CharacterSetECI {
* but unsupported
*/
pub fn getCharacterSetECI(charset: &'static dyn Encoding) -> Option<CharacterSetECI> {
match charset.name() {
let name = if let Some(nm) = charset.whatwg_name() {
nm
}else {
charset.name()
};
match name {
"CP437" => Some(CharacterSetECI::Cp437),
"iso-8859-1" => Some(CharacterSetECI::ISO8859_1),
"iso-8859-2" => Some(CharacterSetECI::ISO8859_2),