Skip to content

Commit 5a6e176

Browse files
committed
fix(header): Fix charset parsing bug.
1 parent fdc78f8 commit 5a6e176

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/header/shared/charset.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl FromStr for Charset {
117117
"ISO-8859-8" => Iso_8859_8,
118118
"ISO-8859-9" => Iso_8859_9,
119119
"ISO-8859-10" => Iso_8859_10,
120-
"Shift-JIS" => Shift_Jis,
120+
"SHIFT-JIS" => Shift_Jis,
121121
"EUC-JP" => Euc_Jp,
122122
"ISO-2022-KR" => Iso_2022_Kr,
123123
"EUC-KR" => Euc_Kr,
@@ -140,6 +140,7 @@ fn test_parse() {
140140
assert_eq!(Us_Ascii,"us-ascii".parse().unwrap());
141141
assert_eq!(Us_Ascii,"US-Ascii".parse().unwrap());
142142
assert_eq!(Us_Ascii,"US-ASCII".parse().unwrap());
143+
assert_eq!(Shift_Jis,"Shift-JIS".parse().unwrap());
143144
assert_eq!(Ext("ABCD".to_string()),"abcd".parse().unwrap());
144145
}
145146

0 commit comments

Comments
 (0)