Lines Matching defs:charset
36 (defconst po-content-type-charset-alist
40 "Alist of coding system versus GNU libc/libiconv canonical charset name.
41 Contains canonical charset names that don't correspond to coding systems.")
43 (defun po-find-charset (filename)
44 "Return PO charset value for FILENAME.
47 (let ((charset-regexp
48 "^\"Content-Type:[ \t]*text/plain;[ \t]*charset=\\(.*\\)\\\\n\"")
54 ;; Try the first 4096 bytes. In case we cannot find the charset value
65 (cond ((re-search-forward charset-regexp nil t) (match-string 1))
68 ;; value was loaded. Load the next 1024 bytes; if charset still
75 (if (re-search-forward charset-regexp nil t)
80 Do so according to FILENAME's declared charset.
81 FILENAME may be a cons (NAME . BUFFER). In that case, detect charset
89 (charset (or (po-find-charset filename) "ascii"))
93 (assoc-string charset
94 po-content-type-charset-alist
97 ((or (setq assoc (assoc-string charset coding-system-alist t))
100 charset)
103 ;; In principle we should also check the `mime-charset'
115 (setq assoc (assoc-string charset coding-system-alist t))
117 ?_ ?- charset)
124 "Return a (DECODING . ENCODING) pair, according to PO file's charset.
130 ;Return a Mule (DECODING . ENCODING) pair, according to PO file charset.