-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
problem file encoding (Umlaute) for external PlantUML diagrams #586
Comments
There's something here, but I need to setup a Windows vm, so it may take some extra time to answer. Files should already be UTF-8, Asciidoctor does not understand other encodings, and in non-Win OSs the example just crashes when processing the cp1252 file. Why in Windows cp1252 works and utf-8 is what I need to research, we only use project.build.sourceEncoding to copy resources which you don't do in the example. I understand that the end goal is to have all files in UTF-8 right? mixing encodings is not going to work ever. |
Right. All should be UTF-8. I just included this cp1252 to test and got lucky. However using ISO-8859-1 works as well, same encoding at least for those characters. If you remove this cp1252 stuff does a non Windows machine render the utf pumls right? |
Yes. That's why I am pluzzed that you get the opposite effect and need to do research. I know Windows does not crash, but using cp1252 as default 🤔 |
Strange. This should be the same as starting java with -Dfile.encoding=UTF-8. Is there another instance of JVM started somehow in the rendering process? At the moment in windows Cp1252 is the standard encoding in Java but in Linux and MacOs its UTF-8. |
I am not sure, if this is the right place or the asciidoctor-diagram project. So hopefully here is the right one.
My maven projects source code is / should be completely UTF-8. Now I want to build a maven site and the pages should be asciidoctor files and integrate an PlantUML diagram, which comes from a file. This diagram is generated but seems to have always the wrong encoding but the internal diagrams are correct.
So how do I tell asciidoctor, that this diagram files should be UTF-8?
What I did / tried so far:
BTW my environment is Windows 11, Java 8, 11, 17, Maven 3.6, 3.8.
I attached a minimal maven project (asciidoctor1.zip) . Just run site:site or look into the target directory I sent.
Look into target/site directory:
diag-....png is correct. It is defined using UTF-8 in overview.adoc![image](https://user-images.githubusercontent.com/1569337/179158650-72f561e6-6ad7-4851-8d9b-b644a28e3cf5.png)
test_class_utf8.png is wrong. It is defined using UTF-8 in test_class_utf8.puml![image](https://user-images.githubusercontent.com/1569337/179158831-6aa28515-c89c-40c5-a605-ed7647d46e0a.png)
test_class_cp1252.png is correct. It is defined using CP1252 in test_class_cp1252.puml![image](https://user-images.githubusercontent.com/1569337/179158754-36a90577-fc61-4752-a384-41cf1d4553c8.png)
So it seems that asciidoctor (diagrams) tries to always use Cp1252 for external PlantUML files, which is strange, since I already reset file encoding to UTF-8.
So what did I wrong?
The text was updated successfully, but these errors were encountered: