From 5a6e176f50fe667fbdc4c933c81d2db5ba5c571d Mon Sep 17 00:00:00 2001 From: Simon Bernier St-Pierre Date: Wed, 4 Mar 2015 00:20:51 -0500 Subject: [PATCH] fix(header): Fix charset parsing bug. --- src/header/shared/charset.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/header/shared/charset.rs b/src/header/shared/charset.rs index bfe663a5de..a2dd94ee0b 100644 --- a/src/header/shared/charset.rs +++ b/src/header/shared/charset.rs @@ -117,7 +117,7 @@ impl FromStr for Charset { "ISO-8859-8" => Iso_8859_8, "ISO-8859-9" => Iso_8859_9, "ISO-8859-10" => Iso_8859_10, - "Shift-JIS" => Shift_Jis, + "SHIFT-JIS" => Shift_Jis, "EUC-JP" => Euc_Jp, "ISO-2022-KR" => Iso_2022_Kr, "EUC-KR" => Euc_Kr, @@ -140,6 +140,7 @@ fn test_parse() { assert_eq!(Us_Ascii,"us-ascii".parse().unwrap()); assert_eq!(Us_Ascii,"US-Ascii".parse().unwrap()); assert_eq!(Us_Ascii,"US-ASCII".parse().unwrap()); + assert_eq!(Shift_Jis,"Shift-JIS".parse().unwrap()); assert_eq!(Ext("ABCD".to_string()),"abcd".parse().unwrap()); }