0

I have posted the same question but didn't mentioned the DB so got duplicated. The issue is related to UTF-8

I have 2 servers :-

server 1 - shows the correct result for the hyphen(-)

server 2 - showing – character for some hyphen(-) only

I am using the meta tag with charset UTF-8

All the values are coming from my SQL server 2008 Database and DB is good regarding the character hyphen(-).

As I am using Sql server 2008 and it uses the character set ios_1 by default and I am using UTF-8 in html page. Don't know this is can be the issue?

On IE its showing the correct character but issue is on Chrome and Fire fox

Whats wrong I cant find it out

Community
  • 1
  • 1
Rushee
  • 766
  • 7
  • 18
  • It's definitely a mojibake problem of some sort. Are you using the likes of `char`, `varchar` or `text` for human-readable text instead of `nchar`, `nvarchar` or `ntext`? – Jon Hanna May 13 '15 at 10:34
  • @JonHanna Yes I am using the varchar(40) datatype. But I cant change that now, Is there any other solution? And What is the issue if I used varchar(40)? – Rushee May 13 '15 at 14:39
  • `vartype` is limited to a particular character set, so there might be characters that just can't fit in there. `-` should be okay but maybe that's actually a `–` or `—` or similar, which can't be stored in most legacy encodings. How are you inserting this data, and how are you getting it out (ADO.NET? Entity Framework? etc.?) – Jon Hanna May 13 '15 at 14:50

0 Answers0