Solved

Accentuation letters in Web forms and SQL

Posted on 2013-05-24
4
202 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
  • 2
  • 2
4 Comments
 
LVL 79

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 79

Accepted Solution

by:
David Johnson, CD, MVP earned 500 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Exchange 2013 where are images stored? 2 43
Cannot upload files above 1mb IIS7 11 48
PHP7 and Sql Server Windows 2008 R2 13 136
Disable SSLv3.0/TLSv1.0 - Windows 2012R2 3 32
What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
Debug Tools to analyse IIS process: This article focus on taking memory dumps from IIS to determine which code is taking more time and to analyse which calls hangs/causes more CPU usage. To take dumps,download the following. Install1: To st…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

770 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