?
Solved

Accentuation letters in Web forms and SQL

Posted on 2013-05-24
4
Medium Priority
?
209 Views
Last Modified: 2013-07-23
Hello,

We are developing a web application (ASP) on a IIS server
The first thing is a registration form for users.
They fill in their first name, name, address etc... to register to our site.
The info is stored in a SQL database (SQL Server 2005)
Now what is strange is the following.
If the internet browse of the user is configured for characters encoding occidental windows 1252, data is ok in the database (we have a back-office system to see it)
But if the internet browse is configured unicode UTF-8, the accentuation letters in the database looks like "chinese"
How shall we fix this ?
Thanks
0
Comment
Question by:LeTay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 82

Expert Comment

by:David Johnson, CD, MVP
ID: 39195602
configure the database to use UTF-8 as well.
0
 

Author Comment

by:LeTay
ID: 39196816
Is it easy to reconfigure the database to use UTF-8 ?
And what about existing data an local backoffice applications ?
Thanks
0
 
LVL 82

Accepted Solution

by:
David Johnson, CD, MVP earned 1500 total points
ID: 39196874
To go from utf-8 to sql's ucs-2
http://www.codeproject.com/Articles/21034/Implementation-of-Unicode-in-SQL-Server

types that support utf-8 are the n series i.e. nchar, nvchar and ntext in comparison with char,vchar and text

.net will also do the conversion for you

good discussion on stackoverflow http://stackoverflow.com/questions/1459395/microsoft-sql-server-2008-and-utf-8

SQL Server uses your local codepage by default.

And I was wrong in my idea that sql server understands UTF-8 ,,, it does and it doesn't maybe sticking with windows-1252 is the best idea.
0
 

Author Comment

by:LeTay
ID: 39197397
Well well
My concern is finally that some users do not use the code windows-1252 in their internet browser, but UTF-8
Is there a way, when they register themselves and type in a name with accents, that the server (ASP code) getting the data can put it correctly in SQL ?
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Running classic asp applications under Windows Server 2008 R2 (x64) and IIS 7 is not as easy as one may think. It took me a while to figure it out while getting error 8002801d a few times. After you install the OS you will need to install the fol…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question