mquinson / po4a

Maintain the translations of your documentation with ease (PO for anything)
http://po4a.org/
GNU General Public License v2.0
127 stars 62 forks source link

Issue with extended characters in attributes and front matter #316

Closed boydkelly closed 3 years ago

boydkelly commented 3 years ago

Hi. Thanks for po4a. Its amazing!

I have recently enabled the ymf_keys in addition to entry options for asciidoc. However when I have extended characters in the attributes or front matter (or tables when enabled) I get a weird result. Since this is all UTF-8 is this considered a bug? Thanks for any insight!

I'm using these options with version .63.

[options] -M UTF-8 -L UTF-8 --copyright-holder "Boyd Kelly" --package-name "Blog" --package-version "1.0" --master-language "fr" -o "entry='tags categories lang catégories'" -o "yfm_keys='lang link hyperlink tags categories image menu title'"

Source file: `--- title: "Mɔgɔ be yen mɔgɔ kɛ mɔgɔ ye"
date: 2018-05-26T20:32:08Z
tags: ["jula", "proverbe", "langue"]
catégories: ["Julakan"]


= Mɔgɔ be yen mɔgɔ kɛ mɔgɔ ye
:author: Boyd Kelly :date: 2018-05-26T20:32:08Z :description: Mɔgɔ be yen mɔgɔ kɛ mɔgɔ ye :lang: fr· :tags: ["jula", "proverbe", "langue"] :categories: ["Julakan"] :skip-front-matter: true include::locale/attributes.adoc[fr]

[width="80%",cols="1",frame="topbot",options="header",stripe="none"] |=== | Mɔgɔ be yen mɔgɔ kɛ mɔgɔ ye. | C'est l'homme qui fait l'homme. |=== ~ ` target file produced by po4a:

`--- categories: [ "Julakan"]
date: 2018-05-26T20:32:08Z
tags: [ "jula", "proverbe", "langue"]
title: "MÉ\x94gÉ\x94 be yen mÉ\x94gÉ\x94 kÉ\x9B mÉ\x94gÉ\x94 ye"


= MÉ<94>gÉ<94> be yen mÉ<94>gÉ<94> kÉ<9b> mÉ<94>gÉ<94> ye
:author: Boyd Kelly
:date: 2018-05-26T20:32:08Z
:description: MÉ<94>gÉ<94> be yen mÉ<94>gÉ<94> kÉ<9b> mÉ<94>gÉ<94> ye
:lang: en·
:tags: ["jula", "language"]
:categories: ["Julakan"]
:skip-front-matter: true
include::locale/attributes.adoc[fr]

[width="80%", cols="1", frame="topbot", options="header", stripe="none"]
|===
| MÉ<94>gÉ<94> be yen mÉ<94>gÉ<94> kÉ<9b> mÉ<94>gÉ<94> ye. | A man makes a man. |=== `

boydkelly commented 3 years ago

Ok sorry, it does seem to be working ok. asciidoctor was claiming that yaml title was bad, and I'm not sure how I fixed it, but deleting the target file and re-runing po4a seems to work fine. Sorry for the noise!

https://coastsystems.net/fr/blog/mogo/

mquinson commented 3 years ago

Thanks for the follow up ;)