MigraDoc RTF文档无法翻译特殊字符。

huangapple go评论60阅读模式
英文:

MigraDoc RTF Document cannot translate special characters

问题

我创建了一个应用程序,在该应用程序中,我们想要创建 .rtf 和 .pdf 文档。
文档中还包含像 ä,ü,ö,ß 这样的字符,我们遇到了一个大问题,那些特殊字符在 RTF 文档中显示不正确。

用于创建 RTF 文档的工具是 "Migradoc" 和 "RtfDocumentRenderer"。

PDF 将被正确创建... 而且对于 RTF 文档,我们已经尝试了一些方法:

  • 在调用渲染器之前设置 UTF 编码

  • 更改区域设置

  • 将文档创建为字节数组,将其转换为数组,对字节数组进行编码,但没有成功

  • 用 Unicode 替代字符。

英文:

I created an application, where we want to create .rtf & .pdf Documents.
The documents also contain characters like ä,ü,ö,ß and we have the big issue, that those special characters are not shown correctly in the RTF Document.

For creating the rtf document, we are using "Migradoc" and the "RtfDocumentRenderer".

The PDF will be created correctly... And for the rtf document, we already tried a few things:

  • Setting the UTF encoding before calling the renderer

  • changing the culture info

  • creating the document as byte array, converting it to an array, encoded the byte array, but without success

  • with Unicode instead of the character.

答案1

得分: 1

使用最新版本,也可以使用特殊的语言字符。(版本 PDFsharp-MigraDoc 6.0.0-preview-2)

英文:

With the newest version, it is possible to use special language characters as well. (Version PDFsharp-MigraDoc 6.0.0-preview-2 )

答案2

得分: 0

当前版本1.51的PDFsharp/MigraDoc面向.NET 2.0/.NET 3.5。特殊字符适用于.NET Framework版本直到4.x。

下一个版本的PDFsharp(6.0.0的预览版本已经发布)面向.NET 6,并正确处理默认编码的更改。

英文:

The current version 1.51 of PDFsharp/MigraDoc targets .NET 2.0/.NET 3.5. Special characters work with .NET Framework versions up to 4.x.

The next version of PDFsharp (preview versions of 6.0.0 have already been published) targets .NET 6 and properly deals with the change of the default encoding.

huangapple
  • 本文由 发表于 2023年2月18日 03:40:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/75488607.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定