Problem - Extended characters print as question marks

W

Walt

We are using ASP.net to develop a new website. The old website uses
legacy ASP connecting to an Oracle database (9.2, W2k3, charecter set
WE8ISO8859P1). The new site connects to the same database but using
ASP.NET.

Our problem is that extended characters are printing out as question
marks. In particular, the "smart quote" characters that MS Word likes
to use are showing up as question marks.

We ran into a similar problem with the legacy ASP about a year ago and
solved it by changing the registry entry
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0/NLS_LANG to
AMERICAN_AMERICA.WE8ISO8859P1 so that it matchs the character set on the
database.

Any clues how to fix it in the dot.net world?

Thanks.
 
J

Jon Skeet [C# MVP]

Walt said:
We are using ASP.net to develop a new website. The old website uses
legacy ASP connecting to an Oracle database (9.2, W2k3, charecter set
WE8ISO8859P1). The new site connects to the same database but using
ASP.NET.

Our problem is that extended characters are printing out as question
marks. In particular, the "smart quote" characters that MS Word likes
to use are showing up as question marks.

What are the unicode values of those characters? I can't see any curly
quotes in ISO-8859-1. (See http://www.unicode.org/charts/PDF/U0080.pdf
for the upper half of ISO-8859-1.)
We ran into a similar problem with the legacy ASP about a year ago and
solved it by changing the registry entry
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE/HOME0/NLS_LANG to
AMERICAN_AMERICA.WE8ISO8859P1 so that it matchs the character set on the
database.

Any clues how to fix it in the dot.net world?

My guess is that the database actually contains duff data (i.e. it
doesn't *really* contain "smart quote" characters) but that the same
mistake that was made when inserting characters (eg treating CP-1252 as
if it were ISO-8859-1) is being made on the way out with the old ASP
app, which would make it work.

See http://www.pobox.com/~skeet/csharp/debuggingunicode.html for a bit
of advice on this kind of thing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top