esteinberg / plantuml4idea

Intellij IDEA plugin for PlantUML
Apache License 2.0
633 stars 113 forks source link

Wrong encoding in preview window #305

Open dwasil opened 3 years ago

dwasil commented 3 years ago

Hello!

First of all, thank you for the definitely useful plugin!

But it seems that after the last update (5.1.0) it has a problem with encoding in the preview window. Exported Png picture finally has correct encoding.

Thank you!

P.S. PHPStorm version 20.3.3

Выделение_203

krasa commented 3 years ago

Try to disable SVG image

Could you post a reproducible example and Help | About | Copy to clipboard text?

dwasil commented 3 years ago

DIsabling SVG - helps, thank you!

Reproducible example:

s.zip

Help | About:

PhpStorm 2020.3.3 Build #PS-203.7717.64, built on March 16, 2021 Licensed to Bitrix / Wasil Dudnik You have a perpetual fallback license for this version. Subscription is active until December 31, 2021. Runtime version: 11.0.10+8-b1145.96 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.4.0-72-generic GC: ParNew, ConcurrentMarkSweep Memory: 1956M Cores: 4 Registry: run.processes.with.pty=TRUE, debugger.watches.in.variables=false Non-Bundled Plugins: com.andrey4623.rainbowcsv, com.github.gtache.lsp, com.intellij.ideolog, net.seesharpsoft.intellij.plugins.csv, com.jetbrains.upsource, MetricsReloaded, com.bitrixsoft.lang, NEON support, com.kalessil.phpStorm.phpInspectionsEA, de.espend.idea.php.annotation, pro.opcode.bitrix, lv.midiana.misc.phpstorm-plugins.deep-keys, fr.adrienbrault.idea.symfony2plugin, ru.adelf.idea.dotenv, PlantUML integration Current Desktop: ubuntu:GNOME

krasa commented 3 years ago

Works for me. I've added some logging.

Could you install plantuml4idea.zip Add debug logging: #org.plantuml image

Then render that broken svg and post the new content of the IDE's log?

dwasil commented 3 years ago

Shure

krasa commented 3 years ago

Strange, the svg xml looks good, the code uses UTF-8, and it works fine for me: image So the problem is probably in the Batik rendering.

What happens when you copy the SVG to clipboard and paste it into svg file in the IDE? image

image

Or click open in external editor as SVG?

dwasil commented 3 years ago

Then all is ok:

Выделение_205

krasa commented 3 years ago

Strange. The code that renders the image is pretty much a copypaste from IntelliJ itself... I canot reproduce it even on Linux with your locale, maybe some other plugin influences it? Could you perhaps try it on a fresh IntelliJ Community?

New build, with even more logging: plantuml4idea.zip

dwasil commented 3 years ago

Shure, a bit later I'll try it, thanks!