Error build HTML-Documentation

I I am trying to export our documentation as HTML and get the following error message:

panicked at lib\paslang\crates\types\src\sym.rs:278:35:
called `Result::unwrap()` on an `Err` value: Utf8Error { valid_up_to: 64, error_len: Some(1) }
Error: Any { ... }

Can anyone tell me what this error means?

We are using Version 6.0.0.16_win64 with Delphi 12.2

Greeting
T.Elmers

@TElmers

Hi, This panic indicates that an xml doc comment has an invalid UTF-8 character. We will add more error log in next update. In addition, you may scan your source files to address the invalid character. (As it is in xml doc comment, dcc may not report the error)

Instead of panic, we will use lossy utf8 in future (e.g. use as replacement)

@TElmers

See issue 47 on the support repo: docinsight.exe panics if xml doc comment contains invalid UTF-8 characters · Issue #47 · devjetsoftware/docinsight-support · GitHub

Hi.
You are right.
Some of our units are saved in ANSI format.
If I change this to ‘UTF-8’, then it works. However, we have a lot of units.

I shink, using the lossy utf8 and report then problem will help.

Regards
T.Elmers

@TElmers

Thanks for the remind! I checked the code and I surprisedly found that some text processing code was not integrated, e.g.

  • UTF-8 without BOM
  • ANSI encoding text

The bug may not be appear in the extension as the text buffer in the IDE is UTF-8, but will panic in DocInsight CLI. so, I create another issue: DocInsight may panic with ANSI encoded file · Issue #48 · devjetsoftware/docinsight-support · GitHub

btw. do you use CodePage option in the Project Options? It makes things more complicated.

@TElmers

Hi, could you please try the latest version 6.0.0.17 to see whether your issues resolved? thanks!

Hi.
This problem seems to have been solved.

Thanks

1 Like