By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,617 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,617 IT Pros & Developers. It's quick & easy.

Posted Unicode Characters Displaying as "???"

P: n/a
Hi all:

I've read through the various related posts in this forum, but without any
success as yet.

I've got an ASP.NET application built in VS.NET 2003, and I'm trying to get
the Armenian Unicode characters I type into the textboxes of my ASPX Web
pages (via IE6) to post back to the server and get saved in my SQL database
as Armenian Unicode characters. Not having much luck, though -- all I get
back are question marks.

If I manually I insert the Armenian Unicode characters into the database and
then request them via Web browser, they come out just fine. My Web.config
file contains the following line:

<globalization requestEncoding="utf-8" responseEncoding="utf-8"
fileEncoding="utf-8" />

.... but still no dice. I admit I'm very new to this stuff, so I'm thinking
perhaps I might have my files saved incorrectly? Again, I'm using Visual
Studio .NET and I'm located in the US, and I don't believe I've manipulated
any of the default settings with regard to file encoding or whatnot, so I'm
stumped.

(My browser's set to UTF-8, incidentally, and it might be worth noting that
when I change my fileEncoding attribute to "Unicode" -- just saw it somewhere
and figured I'd give it a try -- I get an error in Global.asax complaining
about invalid content.)

Any help would be hugely appreciated.

Thanks!
Chris N.
MSDN Universal Subscriber
Nov 19 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Christian Nunciato wrote:
Hi all:

I've read through the various related posts in this forum, but
without any success as yet.

I've got an ASP.NET application built in VS.NET 2003, and I'm trying
to get the Armenian Unicode characters I type into the textboxes of
my ASPX Web pages (via IE6) to post back to the server and get saved
in my SQL database as Armenian Unicode characters. Not having much
luck, though -- all I get back are question marks.

If I manually I insert the Armenian Unicode characters into the
database and then request them via Web browser, they come out just
fine. My Web.config file contains the following line:

<globalization requestEncoding="utf-8" responseEncoding="utf-8"
fileEncoding="utf-8" />
OK.
... but still no dice. I admit I'm very new to this stuff, so I'm
thinking perhaps I might have my files saved incorrectly?
Just make sure that you really save all your ASP.NET source files in
UTF-8.
Again, I'm using Visual Studio .NET and I'm located in the US, and I
don't believe I've manipulated any of the default settings with regard to file encoding or whatnot, so I'm stumped.
If you didn't change the file encoding in VS .NET (UTF-8 is not the
default encoding in the VS .NET versions I'm aware of), you most likely
won't be able to display static Armenian text either.
(My browser's set to UTF-8, incidentally, and it might be worth
noting that when I change my fileEncoding attribute to "Unicode" --
just saw it somewhere and figured I'd give it a try -- I get an error
in Global.asax complaining about invalid content.)
Hm... what happens if you allow your browser to pick up the character
encoding by itself? What browser are you using?
Any help would be hugely appreciated.


Save for the file encoding part (which affects only source files at
build time) it seems you didn't do anything wrong.

The first thing I do in case a page's encoding seems to be screwed up
is to switch between all encodings the browser supports. Once I've
found out which encoding is actually being used, I trace my way back to
the culprit from there.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #2

P: n/a
Have you tried using iso-8859-1 for your encoding ?

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Christian Nunciato" <Ch***************@discussions.microsoft.com> wrote in message
news:3E**********************************@microsof t.com...
Hi all:

I've read through the various related posts in this forum, but without any
success as yet.

I've got an ASP.NET application built in VS.NET 2003, and I'm trying to get
the Armenian Unicode characters I type into the textboxes of my ASPX Web
pages (via IE6) to post back to the server and get saved in my SQL database
as Armenian Unicode characters. Not having much luck, though -- all I get
back are question marks.

If I manually I insert the Armenian Unicode characters into the database and
then request them via Web browser, they come out just fine. My Web.config
file contains the following line:

<globalization requestEncoding="utf-8" responseEncoding="utf-8"
fileEncoding="utf-8" />

... but still no dice. I admit I'm very new to this stuff, so I'm thinking
perhaps I might have my files saved incorrectly? Again, I'm using Visual
Studio .NET and I'm located in the US, and I don't believe I've manipulated
any of the default settings with regard to file encoding or whatnot, so I'm
stumped.

(My browser's set to UTF-8, incidentally, and it might be worth noting that
when I change my fileEncoding attribute to "Unicode" -- just saw it somewhere
and figured I'd give it a try -- I get an error in Global.asax complaining
about invalid content.)

Any help would be hugely appreciated.

Thanks!
Chris N.
MSDN Universal Subscriber

Nov 19 '05 #3

P: n/a
Hi Juan:
Have you tried using iso-8859-1 for your encoding ?


Just tried that, and now my characters seem to be getting posted back as
escaped HTML characters (%#123;, etc.), which throws a warning on postback.
Setting the ValidateRequest property of the @Page directive to false lets
them through as escaped HTML characters.

Thoughts?

Chris
Nov 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.