如何在文件写操作时检测Unicode字符

发布于 2025-02-09 20:20:41 字数 534 浏览 1 评论 0原文

我将内容复制并粘贴到文本区域中,并将其存储在数据库中,然后我找到了Unicode字符,如数据库中所述图像所示。在此数据中创建.ICS文件时,如何检测或替换它们?

当我从数据库中获取并尝试在文件中编写描述或记录此数据时,它会打印出下面的内容。

 jedes Wetter.\r\\n\r\\nDa\r\n mit dein Rasen such

取而代之的是,它应该像

 jedes Wetter.\r\n\r\nDa\r\n mit dein Rasen such

n之前打印double \

我正在从中创建.ICS文件。 之后,它破裂了。

I copied and pasted the content into my text area and stored it in the database then I found Unicode characters as shown in the attached image in my database. How can I detect or replace them while creating a .ics file from this data?

enter image description here

When I fetch from the database and try to write a description in a file or log this data it prints something like the below.

 jedes Wetter.\r\\n\r\\nDa\r\n mit dein Rasen such

instead, It should be like

 jedes Wetter.\r\n\r\nDa\r\n mit dein Rasen such

It prints double \ before n

I am creating a .ics file from this. It breaks after jedes Wetter.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文