Foreign Characters & ASP.net

T

tatemononai

I'm trying to display Japanese characters on an asp.net web forms
application. I am about ready to shave my head too. The whole thing
is just silly.

Ok, inside Visual Studio I can enter Japanese into my code left and
right and it works without any problems. When I dubug the application
any Japanese characters on the page turn into garbage. If I have
characters directly on the page, garbage. If I have characters inside
a text label, garbage again.

But interestingly enough, if I put characters into a custom control
that I wrote, those display just fine. ??

The response encoding (and everything encoding) it set to "utf-8".

The culture and uiCulture are both set to "ja-JP"

??? What is wrong ???
 
J

Joerg Jooss

jasonkester said:
I'm sure you've done this already, but check out the generated HTML
and make sure the first line is not:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

That's what VS.NET generates by default. You may have to tweak it by
hand.

Well, there's a lot that's wrong with that particular line, but I've
never heard that it screws up character encoding?


Cheers,
 

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

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top