scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.88k stars 1.06k forks source link

scaladoc generate garbled code in multilingual. #17546

Open yankun1992 opened 1 year ago

yankun1992 commented 1 year ago

Compiler version

3.2.2, 3.3.0-RC6

Minimized code

I hava blog file 2023-05-19-hello-world-blog.zh.md in directory _blog/_post and it content is:

---
layout: main
author: Yan Kun
title: 你好世界
subTitle: use scaladoc to build blog system
date: 2023-05-19
---

# Start

这是一个用于测试的博客。

Output

The generated code is

<title>�������</title>
...
<h1 class="h500"><a href="#start" class="anchor"></a>Start</h1> 
<p>����һ�����ڲ��ԵIJ��͡�</p> 

图片

By the way, the picture still doesn't appear right. It shadow the document menu #17217

Dedelweiss commented 1 year ago

Hello @yankun1992, thank you for the Issue. I tried to reproduce the problem but I don't have the same result. Is it possible to have your configuration for the build or the layout main that you use ?

Dedelweiss commented 1 year ago

As you can see from the results of my test, the problem seems to have been corrected.

Code:

# Start

这是一个用于测试的博客

Result:

Screenshot 2023-07-11 at 15 21 13

@ckipp01

ckipp01 commented 1 year ago

Please do report back with your configuration if you're still hitting on this with the latest version @yankun1992, but seeing what @Dedelweiss posted this seems to be fixed. I'll close for now and we can re-open if it's still an issue.

yankun1992 commented 1 year ago

Hi @Dedelweiss @ckipp01. I apologize for not noticing your replies. The problem is something I observed in one of my projects at https://github.com/otavia-projects/otavia

Using the command . /millw docs.site it is possible to generate the docs. And the output is in out/docs/site.dest

I have observed that if I run it on linux it generates correct results (see page), but on windows 10 it generates garbled code.

The generated code snippet like

<h1 class="h500"><a href="#start" class="anchor"></a>Start</h1> 
<p>����һ�����ڲ��ԵIJ��͡�</p> 
Dedelweiss commented 1 year ago

Hi @Dedelweiss @ckipp01. I apologize for not noticing your replies. The problem is something I observed in one of my projects at https://github.com/otavia-projects/otavia

Hello @yankun1992, no problem at all.

I have observed that if I run it on linux it generates correct results (see page), but on windows 10 it generates garbled code.

So that explains why I didn't get the same results. I will re-open the issue 👍