从SQL到网页的数据添加的字符 [英] Characters being added to data from SQL to webpage
本文介绍了从SQL到网页的数据添加的字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用经典ASP从SQL 2012中使用本机客户端提供程序SYSCLI11从表中的Text字段类型获取数据。当我查看文本字段中的信息时,在其他数据中,我看到:
I am using classic ASP to get data from a "Text" field type in a table from an SQL 2012, using the native client provider SYSCLI11. When I look at information in the Text field, among the other data, I see this:
<td> </td>
看起来不错。
当我打开网页并在打开表格并获取记录后获取数据,该字段的数据如下:
Which looks good.
When I open the webpage and obtain the data after opening the table and getting the record, the data for that field comes through like this:
<td>Â </td>
我检查确保
标签,但只是空格。 我认为该字段的排序规则类型需要更改但它似乎没有帮助。有没有人对此有任何见解? 谢谢 |
I checked to make sure there was no special hidden characters in the Text field between the
tags in the database but is just the whitespace. I was thinking the collation type for the field would need to be changed but it does not seem to help. Does anyone have any insight on this? Thanks |
推荐答案
我很确定这是一个代码页问题。确保使用与数据存储在数据库中相同的编码发出html代码。使用 Response.CodePage [ ^ ]和编码元标记 [ ^ ]一起提供正确的输出。如我所见,您的数据库中有unicode(utf-8)编码。
I am pretty sure it is a code page problem. Make sure to emit html code with the same encoding as your data is stored in the database. Use Response.CodePage[^] and encoding meta tag[^] in conjunction to provide proper output. As I see, you have unicode (utf-8) encoding in your database.
这篇关于从SQL到网页的数据添加的字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文