aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--src/po.c10
2 files changed, 9 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f39cc24..660952d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2021-02-06 Sergey Poznyakoff <gray@gnu.org.ua>
+
+ Fix po header parsing
+
+ * src/po.c (po_header): Don't handle single quotes. Leave
+ double-quote handling to mu_wordsplit.
+
2018-02-02 Sergey Poznyakoff <gray@gnu.org.ua>
Version 3.2
diff --git a/src/po.c b/src/po.c
index 4072abd..7be1556 100644
--- a/src/po.c
+++ b/src/po.c
@@ -189,7 +189,7 @@ po_header (const char *name)
int status;
struct mu_wordsplit ws;
int wsflags = MU_WRDSF_NOVAR | MU_WRDSF_NOCMD
- | MU_WRDSF_QUOTE
+ | MU_WRDSF_DQUOTE
| MU_WRDSF_CESCAPES
| MU_WRDSF_NOSPLIT;
char *str;
@@ -218,17 +218,11 @@ po_header (const char *name)
len = po_read_line (&pof, &buf, &bufsize);
if (buf[len - 1] == '\n')
buf[--len] = 0;
-
+
for (p = buf; *p && mu_isblank (*p); p++, len--)
;
if (*p == 0)
break;
- if (*p == '"' && p[len - 1] == '"')
- {
- p[len-1] = 0;
- len -= 2;
- p++;
- }
if (len == 0)
continue;
if (mu_wordsplit (p, &ws, wsflags))

Return to:

Send suggestions and report system problems to the System administrator.