来自数据库的有趣角色

发布于 2025-01-08 02:03:49 字数 149 浏览 0 评论 0原文

我不明白这个奇怪的符号代表什么Orits� Williams。我们办公室的一名成员使用 CMS 将其插入到数据库中,当打印到屏幕上时,结果如上例所示。

谁能告诉我它是什么以及我如何替换或逃避它?我认为它与字母“e”有关,组成“Ortise”。

I do not understand what this weird symbol represents Orits� Williams. It was inserted in to the database by a member of our office, using a CMS, and when printed to the screen it comes out like the above example.

Can anybody tell me what it is and how I could replace or escape it? I'm thinking it has something to with the letter "e", to make "Ortise".

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

江南烟雨〆相思醉 2025-01-15 02:03:49

您的数据库可能设置为 ASCII,但您的 Web 应用程序设置为 UTF-8(反之亦然),

因此,要么数据库包含 Web 应用程序无法显示的格式错误的数据,要么 Web 应用程序尝试将 UTF-8 字符显示为ASCII

数据库中字段的类型是什么?

如果它是 VARCHAR,那么您的数据库是 ASCII,而如果它是 NVARCHAR,那么它可能是 UTF-8。即使您的字段是 NVARCHAR,编写不当的 Web 应用程序也可能会错误地插入数据,从而导致字段中的数据格式错误。

It is possible that your database is set to ASCII but your web application to UTF-8 (or vice versa)

Thus either the database has malformed data which the web app cannot display or the web app is trying to display a UTF-8 character as ASCII

What is the type of the field in the database?

If it is VARCHAR then your database is ASCII whereas if it is NVARCHAR then it is likely UTF-8. Even if your field is NVARCHAR a poorly written web app may have inserted the data improperly resulting in malformed data in the field.

み格子的夏天 2025-01-15 02:03:49

使用下面的这个函数将所有字符一一公开以查看它们的ASCII,

Sub ExposeAllChars(yourInput)

    Dim lLoop,sNew,iChr,dim curChar,length_of_your_input

    length_of_your_input = Len(yourInput)

    For lLoop = 1 To length_of_your_input

        curChar = Mid(yourInput, lLoop, 1)

        iChr = Asc(curChar)

        Response.write "<li>char:[" & curChar & "] = ascii value:[" & iChr & "]"

    Next

End sub

然后您可以处理问题知道哪个ascii字符是麻烦制造者...

然后您可以使用htmlcharset来正确写入该特殊字符

use this function below to expose all the chars one by one to see their ASCII,

Sub ExposeAllChars(yourInput)

    Dim lLoop,sNew,iChr,dim curChar,length_of_your_input

    length_of_your_input = Len(yourInput)

    For lLoop = 1 To length_of_your_input

        curChar = Mid(yourInput, lLoop, 1)

        iChr = Asc(curChar)

        Response.write "<li>char:[" & curChar & "] = ascii value:[" & iChr & "]"

    Next

End sub

then you can deal with the problem knowing which ascii char is the troublemaker...

then you can use the htmlcharset to get that special char written properly

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文