Closed 9ao9ai9ar closed 3 years ago
Hi @9ao9ai9ar, I've some difficulty to reproduce your issues as I've only Linux machines.
What are the character encodings of the .md
and the .puml
files? From the first test it seems the the system is expecting a CP1252
encoded file (Windows default) but the contents cannot be decoded (UTF-8
?).
Can you attach to this issue a .puml
file with your characters? Cut and pasting from the browser makes UTF-8
files...
Hi @mikitex70, Visual Studio Code indicates that the .md
and .puml
files are in UTF-8
encoding. I ran the following commands (using Miniconda on Windows) to create my test environment:
conda create -n test python
conda activate test
pip install mkdocs plantuml-markdown
mkdocs new test
cd test
# Move the test files inside docs folder and edit index.md to include the following lines (without the opening #'s):
# ```plantuml source="test1.puml"
# ```
mkdocs serve
I attach the whole MkDocs project folder here: test.zip.
Currently, I can use Markdown-Include to include .puml
files without issues.
I've release the version 3.4.3
, give it a try.
I've forced utf-8
encoding for files referenced by the source
parameter; this should resolve your issue.
A new configuration option (encoding
) can be used to change the default, useful in Windows which has cp1252
as the default encoding.
I can confirm that this issue is fixed in version 3.4.3
. Thank you for the prompt response and release of a fix.
Environment
Windows 10 Python 3.9.6 mkdocs 1.2.2 plantuml-markdown 3.4.2
Test cases
test1.puml
:test2.puml
:Output
The test cases render fine if the code is inlined; this problem only manifests itself when using the
source
parameter.