开发者

Fetching German character from oracle database

开发者 https://www.devze.com 2023-01-02 00:30 出处:网络
I have database as Oracle and development is in asp.net. Data stored is as, Förderer, Jörg etc. Everything works fine on my local environment, where i can fetch the records having German characters

I have database as Oracle and development is in asp.net. Data stored is as, Förderer, Jörg etc.

Everything works fine on my local environment, where i can fetch the records having German characters, and i can display it on users browser.

However, when i deploy the solution on client machine, problem starts. When i fetch data from Oracle db. and fill a drop down or display it on label, it just does not show correct data. For e.g., Förderer gets converted to Forderer Jörg gets converted to Jorg ....

However, when i simply Response.Write("Förderer"), browser display it correctly. This means, that what i set in web.config works,

But, when it fetches information from db. , it does not display correctly. Then, i tried one more solution, to just avoid any direct table access. For that , i simply created TableAdapter, with command text like this,

Dim sQuery As String = "" sQuery = "SELECT 'Förderer' FROM DUAL"

Now, when i fetc开发者_运维百科h information from dataset, that i filled with above command, it again does not display correct data, but converted "Forderer".

I appreciate any suggestion/help toward this.

-Divyesh


Have you tried setting the current thread's Culture to "de-de" in Page_Init?

Dim germanCulture As New System.Globalization.CultureInfo("de-DE")
System.Threading.Thread.CurrentThread.CurrentCulture = germanCulture
0

精彩评论

暂无评论...
验证码 换一张
取 消