original commit: 3b1018398c1fe7ffd6732491b7f944ae7d30df21
This commit is contained in:
Matthew Flatt 2004-10-06 20:27:13 +00:00
parent bd53af6570
commit 943232f7ca

View File

@ -53,6 +53,7 @@
(define re:iso #rx#"^[iI][sS][oO]-8859-1$") (define re:iso #rx#"^[iI][sS][oO]-8859-1$")
(define re:gb #rx#"^[gG][bB](2312)?$") (define re:gb #rx#"^[gG][bB](2312)?$")
(define re:ks_c #rx#"^[kK][sS]_[cC]_5601-1987$")
(define re:utf-8 #rx#"^[uU][tT][fF]-8$") (define re:utf-8 #rx#"^[uU][tT][fF]-8$")
(define re:encoded #rx#"^(.*?)=[?]([^?]+)[?]([qQbB])[?](.*?)[?]=(.*)$") (define re:encoded #rx#"^(.*?)=[?]([^?]+)[?]([qQbB])[?](.*?)[?]=(.*)$")
@ -67,6 +68,9 @@
[(regexp-match re:gb encoding) (if (bytes? encoding) [(regexp-match re:gb encoding) (if (bytes? encoding)
#"GBK" #"GBK"
"GBK")] "GBK")]
[(regexp-match re:ks_c encoding) (if (bytes? encoding)
#"CP949"
"CP949")]
[else encoding])) [else encoding]))
(define (decode-for-header s) (define (decode-for-header s)