Hi,
I am having characterset issue when showing data from the database. Upon checking my database settings, the NLS_CHARACTERSET is set as "US7ASCII".
This project that I am currently working on was previously written in PHP. I then had to migrate it into asp.net.
Take note that the german special characters are shown as boxes in the database and were shown correctly in PHP using htmlentities.
I am using the function below to try and convert the data from the database but what I get is "?" as replacement for the accented character:
PublicFunction ToDEUnicode(ByVal str AsString)AsString
Dim bytes20127AsByte()
Dim bytesAsByte()
Dim encoding20127As System.Text.Encoding = System.Text.Encoding.GetEncoding(20127)
Dim enc28591As System.Text.Encoding = System.Text.Encoding.GetEncoding(28591)
bytes20127 = encoding20127.GetBytes(str)
bytes = System.Text.Encoding.Convert(encoding20127, enc28591, bytes20127)
Dim convertStringAsString
convertString = enc28591.GetString(bytes)
Return convertString
EndFunction
---------------------------------------------
Sample Output:
Waage f?r Magazine
----------------------------------------------
I had also tried to do a different approach where I had used convert() on the query itself.
Example:
select convert(tool_name, WE8ISO8859P1) tool_name from ...
Output:
Waage f�r Magazine
-----------------------------------------
I very much appreciate if anyone can help me with this problem.
Thank you very much.