Closed beck closed 5 years ago
When using the header:
msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Content-Type: text/plain; charset=UTF-8\n"
The charset is recognized as:
iso-8859-1
But adding another header, or swapping the two headers results in utf-8 so long as charset is not the final header.
utf-8
charset
I believe the issue lies in this regex: https://github.com/smhg/gettext-parser/blob/c575146b2956899352e6acfccb081be583555cfa/lib/poparser.js#L82
Thanks for the report! I recently took over this project and will follow up on this.
When using the header:
The charset is recognized as:
But adding another header, or swapping the two headers results in
utf-8
so long ascharset
is not the final header.I believe the issue lies in this regex: https://github.com/smhg/gettext-parser/blob/c575146b2956899352e6acfccb081be583555cfa/lib/poparser.js#L82