473,563 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reading and Displaying Japanese data in MS SQL Server using ASP

1 New Member
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=ut f-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 3768
sashi
1,754 Recognized Expert Top Contributor
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
11985
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 double-byte characters can be held in the same DB without issue. However, when holding two sets of DIFFERING double-byte characters (i.e. Chinese and...
3
2536
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 of unreadable characters on my label. Are there settings/properties for a label on a windows form to be able to read japanese text? Is it when I...
21
2470
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 characters getting sent back and forth are in Japanese they come back from the server "moji bake" (corrupted). Anybody have any ideas why this might work...
11
4732
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 in japanese. But I am unable to display them back to GUI. It displays some junk characters Can anyone suggest me some way how to debug the issue. ...
1
3050
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 languages including Japanese, it appears as if we would be best off using codepage of 1208 and UTF-8. We are thinking we would need to expand our...
4
5844
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) - Comments are printed through a MS-Access 2002 front-end... Most comments are in English, Spanish or French. Some comments are English + Japanese.
11
3754
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 attempt to change the text following a button-click event, it displays as junk. I have tried setting the globalization tag in the web.config file...
1
2743
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 column data into SQL Server 2000 table called Customer. This table has a Customer Name column and it is nvarchar type. I trird this to import using...
0
7583
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5213
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1198
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.