473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 3762
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.