terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
16.59k stars 417 forks source link

[0.6.6] Error occurs when non-Latin characters are used in the directory name on windows. #2039

Open bo-ku-ra opened 1 month ago

bo-ku-ra commented 1 month ago
./
│  t.d2
│  t.svg
│
└─あ
        inu.png

ex1) icon:"/あ/inu.png"

t.d2

a{
shape:image
icon:"/あ/inu.png"
}

err:

err: failed to bundle /%E3%81%82/inu.png: open c:\(...[non-Latin characters can used in the directory name]...)\%E3%81%82\inu.png: The system cannot find the path specified.
err: failed to compile t.d2: failed to bundle local images: [/%E3%81%82/inu.png]

t.svg image

ex2) icon:"./あ/inu.png"

t.d2

a{
shape:image
icon:"./あ/inu.png"
}

err: (same messages)

err: failed to bundle /%E3%81%82/inu.png: open c:\(...[non-Latin characters can used in the directory name]...)\%E3%81%82\inu.png: The system cannot find the path specified.
err: failed to compile t.d2: failed to bundle local images: [/%E3%81%82/inu.png]

t.svg image

bo-ku-ra commented 1 month ago

Error occurs when non-Latin characters are used in the file name, too. (ex. "いぬ.png")