I have installed Typst-CLI on my Mac and am using the TinyMist extension in VSCode. When I use #link with a URL containing CJK characters, it seems that the URL becomes broken after exporting the document to PDF (it works fine when previewed in VSCode).
I’m not very knowledgeable about URL encoding, so I can’t explain it in detail, but I suspect that the issue lies in the process of converting non-ASCII URLs to ASCII, which seems to be handled differently than in a web browser.
Here’s the specific issue:
- The original URL used with
#link: https://www.law.go.kr/법령/보건의료기본법/제3조
- The URL copied from the browser’s address bar after accessing the site: https://www.law.go.kr/%EB%B2%95%EB%A0%B9/%EB%B3%B4%EA%B1%B4%EC%9D%98%EB%A3%8C%EA%B8%B0%EB%B3%B8%EB%B2%95/%EC%A0%9C3%EC%A1%B0
- The URL in the PDF after exporting from Typst with the same link: https://www.law.go.kr/%C3%AB%C2%B2%C5%81%C3%AB%E2%82%AC%C2%B9/%C3%AB%C2%B3%C2%B4%C3%AA%C2%B1%C2%B4%C3%AC%C5%A1%C5%B8%C3%AB%C2%A3%E2%80%9E%C3%AA%C2%B8%C2%B0%C3%AB%C2%B3%C2%B8%C3%AB%C2%B2%C5%81/%C3%AC%E2%82%AC%C5%933%C3%AC%C2%A1%C2%B0
I have installed Typst-CLI on my Mac and am using the TinyMist extension in VSCode. When I use
#linkwith a URL containing CJK characters, it seems that the URL becomes broken after exporting the document to PDF (it works fine when previewed in VSCode).I’m not very knowledgeable about URL encoding, so I can’t explain it in detail, but I suspect that the issue lies in the process of converting non-ASCII URLs to ASCII, which seems to be handled differently than in a web browser.
Here’s the specific issue:
#link: https://www.law.go.kr/법령/보건의료기본법/제3조