42 |
(defun po-find-charset (filename) |
(defun po-find-charset (filename) |
43 |
"Return PO charset value for FILENAME." |
"Return PO charset value for FILENAME." |
44 |
(let ((charset-regexp |
(let ((charset-regexp |
45 |
"^\"Content-Type: text/plain;[ \t]*charset=\\(.*\\)\\\\n\"") |
"^\"Content-Type:[ \t]*text/plain;[ \t]*charset=\\(.*\\)\\\\n\"") |
46 |
(short-read nil)) |
(short-read nil)) |
47 |
;; Try the first 4096 bytes. In case we cannot find the charset value |
;; Try the first 4096 bytes. In case we cannot find the charset value |
48 |
;; within the first 4096 bytes (the PO file might start with a long |
;; within the first 4096 bytes (the PO file might start with a long |