I am currently working on a web application using C#.
One of the online forms allows the user to update their address.
However, when I enter for example : ÀîâãäåæéêìñóôõăąăĂąĄ into any of the address info
and then search for the same user again their address is displayed on the screen like this.
As you can see the last characters seem to be wrong.
Wrong in the database too.
Do I need to do something to the string before I send it for update, at the moment I just convert whatever is in the text field to uppercase and send the information to my stored procedure.
,@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
Please help. Note Ive tried changing to nchar - but I think this may be a C# thing? Thanks
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);