I can get Japanese to display when the text is static, i.e., embedded in the html, but have been unable to display it when it comes from the database.
When I use Access to view the table, I can see that the Japanese text is correct in the database. I have added the meta tag <meta http-equiv="Content-type" content="text/html;charset=utf-8"> as the first line following the <head> tag. My understanding is that I need something comparable in the ASP code. I tried adding the following (bolded line) at the top of the code:
Expand|Select|Wrap|Line Numbers
- <%@ Language=VBScript %>
- <%Option Explicit%>
- Response.ContentEncoding = Encoding.UTF8;
- <!-- #INCLUDE FILE="includes/aspConnection.asp" -->
(Note: I recompiled the stored procedure after I changed the column type to nvarchar),
Expand|Select|Wrap|Line Numbers
- Sub ProcessLogin()
- Dim objCmd
- Dim objRst
- Set objCmd = server.CreateObject("ADODB.Command")
- With objCmd
- .ActiveConnection = objCnn
- .CommandType = adCmdStoredProc
- .CommandText = "ModuleIntro_By_Login_Language_ssp"
- .Parameters.Append .CreateParameter("LanguageCode_sz", adVarChar, adParamInput, 3 , strLanguageCode)
- .Parameters.Append .CreateParameter("LoginID_sz", adVarChar, adParamInput, 50, strSubmit)
- End With
- Set objRst = server.CreateObject("ADODB.Recordset")
- With objRst
- .Open objCmd, , adOpenStatic, adLockReadOnly
- if .RecordCount > 0 then
- strLogin = strSubmit
- intModule = .Fields("CurrentModule_l")
- strModuleIntro = .Fields("ModuleIntro_sz")
- strDivDisplayModuleIntroStyle = "Display:Block;"
- Call DisplayModuleIntro(strModuleIntro, intModule)
- else
- strDisplayLoginProblemStyle = "Display: block;"
- Call DisplayUserUnknown(strLanguageCode)
- end if
- .Close
- End With