Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
When i try to retrieve swedish characters like Ö Å é from the database into the dataset, it is displayed as Ö Ã… é when I view the dataset values by debugging.

How do I correctly retrieve the data?
I have tried the following which didn't work:
1. In code behind:
Dim currentCultureInfo As New CultureInfo("sv-SE")
        dataSet.Locale = currentCultureInfo
2. In web.config :
<globalizatio<n fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="sv-SE" uiCulture="en-US" /> 

Kindly help me sort this issue.
Thanks in Advance !!!
Posted 8-Nov-12 20:33pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

try UTF-32 since UTF-8 might not be able to represent all the characters
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

2 things:
What kind of data type do you set for text fields? Probably you need NVARCHAR instead of VARCHAR
You need to encode data...
To set the encoding for an individual page, set the RequestEncoding and ResponseEncoding attributes of the @ Page directive, as shown in the following example:
<![CDATA[<%@ Page RequestEncoding="utf-8" ResponseEncoding="utf-8" %>]]>

See related links:[^]
Using Character Encoding in ASP.NET[^][^]
More about encoding and globalization for ASP.NET, you'll find here:[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 838
1 OriginalGriff 461
2 Tadit Dash 355
3 sanket saxena 329
4 Peter Leow 228
0 Sergey Alexandrovich Kryukov 12,109
1 OriginalGriff 7,326
2 Peter Leow 5,003
3 Abhinav S 4,003
4 Maciej Los 3,575

Advertise | Privacy | Mobile
Web04 | 2.8.140421.2 | Last Updated 9 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid