How to code Unicode strings in VB in dot net?

G

Guest

When we use the following code, we get ?? on the output.
Question: How to code the string so we get the Chinese Characters?
=========================================
<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="iso-8859-1"
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<script language="VB" runat="server">
sub page_load(obj as object, e as eventargs)
dim testString as string
testString = "主 é "
lbTest.text = testString
end sub
</script>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<form runat="server">
<asp:label BackColor="whitesmoke"
ID="lbTest"
Text="Fill this in"
runat="server">
</asp:label>
</form>
</body>
</html>
=========================================
 
G

Guest

Humm, OK. Changed to UTF-8. Same results. Displays ??. I will read the
article further to see if there is more I can do to create a workable unicode
string of Chinese Characters.
 

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