Help me in ASP.NET

H

HelpNeeded

Case #1

I am facing some problem for dipalying Japanese Charectors with ASP.NET. I

used "charset=SHIFT-JIS" in the meta tag.(Code is shown below). When i run

this code, the Encoding value of browser showing as "Unicode (UTF-8)" only

but it should be "Japnese Shift-JIS".

( This i verified by right clicking inside IE and select Encoding)

If i use the same meta tag in normal ASP or HTML pages the browser value of

Encoding is setting as "Japanese Shift-JIS".

What should i do for setting the Encoding "Japnese Shift-JIS" ?

Case #2

What should i do for showing Japaneese Charectors in alert messages? Right

now some box charectors are displaying.





---------------------ASPX COde -----------------------------------------

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="test.aspx.vb"

Inherits="MierukaWeb.test"%>

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

<HTML>

<HEAD>

<title>test</title>

<meta name="GENERATOR" content="Microsoft Visual Studio.NET

7.0">

<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">

<meta name="vs_defaultClientScript" content="JavaScript">

<meta http-equiv="Content-Type"

content="text/html;charset=SHIFT-JIS">

</HEAD>

<body>

<form id="Form1" method="post" runat="server">

<asp:TextBox id="TextBox1" style="Z-INDEX: 101;

LEFT: 405px; POSITION:

absolute; TOP: 30px" runat="server"></asp:TextBox>

<asp:Button id="Button1" style="Z-INDEX: 102; LEFT:

158px; POSITION:

absolute; TOP: 57px" runat="server" Text="Button"></asp:Button>

</form>

</body>

</HTML>

----------------------------------------------------------------------------

----

On click the button the charector typed in the text box are showing as alert

message.





Kindly help me, I am struck here badly.

with regards,
 
G

Gerald Klein

Prefixing literal strings with N"like this"
..Net handles it nativly when you set up a page one of the properties is the
language target, set there and use the Capital "N" in from of string
indicates national characters.
 
H

HelpNeeded

Thanks for your time Gerald. But I am not sure I understand this properly.
Do you mind elaborating it for me?
Regards.
 
J

Juan T. Llibre

Have you tried setting the encoding in the globalization section of web.config,
instead of in the meta tag ?

<globalization
requestEncoding="Shift-JIS"
responseEncoding="Shift-JIS"
/>

....making sure that your OS has Japanese character support enabled ?

You might need to set FileEncoding to the same value.





Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
 

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