472,779 Members | 1,825 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

Reading and Displaying Japanese data in MS SQL Server using ASP

1
I am using MS SQL Server 2000 and 2005, IIS 5,0 and ASP. I am able to display data that has been selected from a Unicode column in the database in all languages except Japanese (I get question marks when the data is Japanese).

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
  1. <%@ Language=VBScript %>
  2. <%Option Explicit%>
  3. Response.ContentEncoding = Encoding.UTF8;
  4. <!-- #INCLUDE FILE="includes/aspConnection.asp" -->
  5.  
Here's the code where I am getting the data for strModuleIntro:
(Note: I recompiled the stored procedure after I changed the column type to nvarchar),
Expand|Select|Wrap|Line Numbers
  1. Sub ProcessLogin()
  2.   Dim objCmd
  3.   Dim objRst
  4.  
  5.   Set objCmd = server.CreateObject("ADODB.Command")
  6.  
  7.   With objCmd
  8.         .ActiveConnection = objCnn
  9.         .CommandType = adCmdStoredProc
  10.         .CommandText = "ModuleIntro_By_Login_Language_ssp"
  11.         .Parameters.Append .CreateParameter("LanguageCode_sz", adVarChar, adParamInput, 3 , strLanguageCode)
  12.         .Parameters.Append .CreateParameter("LoginID_sz", adVarChar, adParamInput, 50, strSubmit)
  13.   End With
  14.  
  15.   Set objRst = server.CreateObject("ADODB.Recordset")
  16.  
  17.   With objRst
  18.     .Open objCmd, , adOpenStatic, adLockReadOnly
  19.  
  20.     if .RecordCount > 0 then
  21.       strLogin = strSubmit
  22.       intModule = .Fields("CurrentModule_l")
  23.       strModuleIntro = .Fields("ModuleIntro_sz")
  24.       strDivDisplayModuleIntroStyle = "Display:Block;" 
  25.       Call DisplayModuleIntro(strModuleIntro, intModule)
  26.     else
  27.       strDisplayLoginProblemStyle    = "Display: block;"
  28.       Call DisplayUserUnknown(strLanguageCode)
  29.     end if
  30.  
  31.     .Close
  32.   End With
  33.  
Any help would be greatly appreciated!
Nov 1 '06 #1
1 3727
sashi
1,754 Expert 1GB
Hi there,

Do you have Asian Font Set installed in your server? Check it out.
Nov 1 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: GPenn | last post by:
SQL 2000, latest SP. We currently have the need to store data from a UTF-8 application in multiple languages in a single database. Our findings thus far support the fact that single-byte and...
3
by: Benoit Martin | last post by:
in my windows app, I have some japanese text that I load from a text file and display on a label. No matter what type of encoding I try to use on the text file, the text always comes up as a bunch...
21
by: Doug Lerner | last post by:
I'm working on a client/server app that seems to work fine in OS Firefox and Windows IE and Firefox. However, in OS X Safari, although the UI/communications themselves work fine, if the...
11
by: prats | last post by:
I want to write a GUI application in PYTHON using QT. This application is supposed to take in Japanese characters. I am using PyQt as the wrapper for using QT from python. I am able to take input...
1
by: tony.pahl | last post by:
We are converting a data warehouse to a Unicode database to get ready for multilingual support. If we will have 95% of our data in English as we currently do, and less than 5% in other foreign...
4
by: DL | last post by:
Hi, Our school has an application in which : - Teachers enter comments through a web interface built in asp (not asp.net). - Comments are stored in a SQL server 2000 (in a nText field) -...
11
by: pardesiya | last post by:
Friends, I am having trouble displaying Japanese text within a textbox (or anywhere else) in an aspx page with .net 2.0 framework. Initial default text in Japanese displays perfectly but when I...
1
by: Kots | last post by:
Hi, I have an excel sheet, and have a column called Customer Name. This column contains data that is in different languages.. english, chinese, Japanese and Korean names. I need to import this...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.