From 0cd9a1a9199b5ebaf32319685db083432acdd574 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 16 Mar 2002 16:14:38 +0000 Subject: [PATCH] (po-find-charset): Search for Charset= header even if we've read less than 4KB. --- lisp/ChangeLog | 5 +++++ lisp/textmodes/po.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b93c92be2e2..70db7f61a21 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2002-03-16 Eli Zaretskii + + * textmodes/po.el (po-find-charset): Search for the Charset= + header even if we've read less than 4KB. + 2002-03-16 Pavel Jan,Bm(Bk * textmodes/bibtex.el (bibtex-sort-ignore-string-entries) diff --git a/lisp/textmodes/po.el b/lisp/textmodes/po.el index 30a188cf688..191f166e1e6 100644 --- a/lisp/textmodes/po.el +++ b/lisp/textmodes/po.el @@ -130,8 +130,8 @@ Content-Type into a Mule coding system.") (1- (point)) (1- (+ (point) 4096))))) (setq short-read (< (nth 1 pair) 4096))))) - (cond (short-read nil) - ((re-search-forward charset-regexp nil t) (match-string 1)) + (cond ((re-search-forward charset-regexp nil t) (match-string 1)) + (short-read nil) ;; We've found the first msgid; maybe, only a part of the msgstr ;; value was loaded. Load the next 1024 bytes; if charset still ;; isn't available, give up. -- 2.39.2