我在数据库中插入以下文本:
.Pour lemon juice immediately on fruits.
.In a little water add sugar and half melt it on heat.
.Mix melted sugar to the fruits. Refrigerate it and serve the fruit salad chilled.
.Note: Salt and chaat masala can also be used
插入此数据不会产生错误,但是当我显示上述数据时,我得到这个:
• Pour lemon juice immediately on fruits.
• In a little water add sugar and half melt it on heat.
• Mix melted sugar to the fruits. Refrigerate it and serve the fruit salad chilled.
• Note: Salt and chaat masala can also be used
句点替换为‚Ä¢
。
请指导我,我怎么能显示插入的周期符号,而不是上面的输出。
您可能需要确保您插入的字符实际上是您认为的字符,例如 U + 2e,ASCII 句点。
有很多“句号”字符,你可以看到here,它只需要使用一个“非标准”变体来阻塞一个不知道如何渲染它的应用程序。
您看到的三个字符序列(‚Ä¢
)实际上只是您插入的字符的 UTF-8 编码。
这可能是更有可能的情况,因为你的文本中的那些领先的“句点”可能更有意义,如U+2022,它会给你 UTF-8 代码0xe2 0x80 0xa2
(0xa2 是美分符号-虽然其他字节不匹配,这是你正在寻找的东西)。
可能你发现的最好的机会是将你发送到 SQL INSERT 语句的数据记录到某个文件中,然后对该文件进行十六进制转储,以查看错误的字符是什么。
如果它不是 U + 2e 的 ASCII 风格时期,那可能是造成麻烦的原因。
即使 SQLite 可能能够存储它,这并不能保证无论你使用显示它是由任务。
本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处
评论列表(75条)