Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/337.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
扩展字符不显示C#_C#_Unicode_Web Applications_Extended Ascii - Fatal编程技术网

扩展字符不显示C#

扩展字符不显示C#,c#,unicode,web-applications,extended-ascii,C#,Unicode,Web Applications,Extended Ascii,我目前正在使用C#开发一个web应用程序 其中一个在线表单允许用户更新其地址 但是,当我在任何地址信息中输入例如:ÀîåæìõăăĂąĄ 然后再次搜索同一用户,他们的地址会显示在屏幕上 正如你所看到的,最后几个字符似乎是错的 数据库中也有错误 在发送字符串进行更新之前,我是否需要对字符串做些什么?此时,我只需将文本字段中的内容转换为大写,并将信息发送到存储过程 ,@p_AddressLine1 char(40)=NULL ,@p_AddressLine2 char(40)=NULL ,@p_Ad

我目前正在使用C#开发一个web应用程序

其中一个在线表单允许用户更新其地址

但是,当我在任何地址信息中输入例如:ÀîåæìõăăĂąĄ

然后再次搜索同一用户,他们的地址会显示在屏幕上

正如你所看到的,最后几个字符似乎是错的

数据库中也有错误

在发送字符串进行更新之前,我是否需要对字符串做些什么?此时,我只需将文本字段中的内容转换为大写,并将信息发送到存储过程

,@p_AddressLine1 char(40)=NULL
,@p_AddressLine2 char(40)=NULL
,@p_AddressLine3 char(40)=NULL
,@p_AddressLine4 char(40)=NULL
,@p_AddressLine5 char(40)=NULL
请帮忙。注意:我试着换成nchar,但我认为这可能是一个C#东西? 谢谢


您正在处理的扩展字符集不能存储在
char
字段类型中,因此只能使用
nchar
nvarchar
,但请注意Unicode字符的空间要求,这将占用两倍的空间


这是一个很好的解释差异的方法,是关于您应该使用的数据类型的文档。

您的数据库默认排序规则是什么?e、 g.
selectserverproperty('collation')
SQL\u Latin1\u General\u CP1\u CI\u as在网页上显示信息之前使用调试器时,值是否仍然错误?另外,请在显示前阅读“是”,该值仍然错误。在调用存储过程之前,它是否已损坏?非常感谢,这非常有效!!!!!但仍然以CSV的形式通过——通过的形式为:ÀÎÂÃÄÅÆÉÊÌÑÓÔÕ这次它看起来更像编码为HTML实体的Unicode字符
user.PostCode = this.tbPostCode1.Text.ToUpper().Trim() + " " + this.tbPostCode2.Text.ToUpper().Trim();
        user.AddressLine1 = this.txtAddressLine1.Text.ToUpper().Trim();
        user.AddressLine2 = this.txtAddressLine2.Text.ToUpper().Trim();
        user.AddressLine3 = this.txtAddressLine3.Text.ToUpper().Trim();
        user.AddressLine4 = this.txtAddressLine4.Text.ToUpper().Trim();
        user.AddressLine5 = this.txtAddressLine5.Text.ToUpper().Trim();



        user.Update(user);