Wrox Programmer Forums
|
ASP Pro Code Clinic As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Pro Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 15th, 2004, 04:23 AM
Authorized User
 
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hindi language fonts in text box

Hi!

I want the user entered data in certain text boxes to be in my local language, Hindi. The hindi font "DV-TTYogeshEN Bold" is installed in my PC.
I have used the following code in my .asp form

<td><input type="text" id=txtVisitorFirstNameHindi name=txtVisitorFirstNameHindi size =30 value = <%=null%>></td>

With the use of this font, whatever i type in the textbox, should appear in hindi. But this is not happening. Wot should i do?

regards
ashu
 
Old March 15th, 2004, 05:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi ashu

No, it should not. Font tags are not inherited down to the text box.
You you set a style attribute on the text box instead:

<input style="font-family:'DV-TTYogeshEN Bold'" type="text" id=txtVisitorFirstNameHindi name=txtVisitorFirstNameHindi size =30 value = <%=null%>>

In fact, the tag is marked as deprecated, so you shouldn't use it anymore, but use CSS styles instead.

Can you please not post the same message in multiple forums? Your message will be read anyway.

Cheers,

Imar

I edited this message, because I left out font-family:.


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 15th, 2004, 05:34 AM
Authorized User
 
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for the prompt reply Imar!
But the code is still not working even though I can see this font in Control Panel->Fonts.

 
Old March 15th, 2004, 05:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you see my modification of the style property? I edited my message and added: font-family:

Also, make sure you enclose the font name in apostrophes when the name contains a space.

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 15th, 2004, 05:56 AM
Authorized User
 
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar!

the code is still not working. wot should i do?

regards
ashu
 
Old March 15th, 2004, 06:13 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Three things:

Firstly, try with another font, for example Times and see if that works. If it does, you know your code is good, and that the problem is somewhere else.

Secondly, post the code you have now. Maybe something is wrong somehow.

Thirdly, check that your page and browser support that font. I am not experienced with working with these kind of fonts, so I can't be of much help in that. I think you should somehow indicate in your page that you are using a "non-basic" font. Maybe this will work (at the top of your page):

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1081"%>

I think that 1081 is the code page for Hindi, but check Google for more information on this.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 15th, 2004, 06:34 AM
Authorized User
 
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar

1. I tried using an existing english font called 'Garamond.' Did not work. So you are right. Something wrong with the code.

2. The code is as follows:

<td><input style="font-family:'DV-TTYogeshEN Bold'" type="text" id=txtVisitorFirstNameHindi name=txtVisitorFirstNameHindi size =30 value = <%=null%>></td>

3. I tried codepage = 1081. I got the following error:

Active Server Pages error 'ASP 0203'

Invalid Code Page

/visitor.asp, line 1

The specified code page attribute is invalid
 
Old March 15th, 2004, 06:58 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Strange, this worked for me:

<td><input style="font-family:'Comic Sans MS'" type="text" id=txtVisitorFirstNameHindi name=txtVisitorFirstNameHindi size =30 value = <%=null%>></td>

What browser are you using? Does the style for the textbox get overwritten in an (external) stylesheet somewhere?

Is the font called DV-TTYogeshEN Bold, or just DV-TTYogeshEN and you're trying to make it bold? The font-family needs an exact match with the font name. You can use font-weight to set it to bold.

Like I said, I am not experienced with other fonts. Maybe you need an additional language pack for this to work; maybe not. What did Google say about the "The specified code page attribute is invalid" error?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 15th, 2004, 07:12 AM
Authorized User
 
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Response from google[http://www.macromedia.com/support/dr...ode_page.htm]:

Reason
Internet Information Server 4.0, with Windows NT Service Pack 4 or greater, does not support code pages. This creates a problem with some double-byte character sets that extended beyond 2 bytes in size.

Solution
The web server running Internet Information Server 4.0 must be upgraded to Internet Information Services 5.0. The following Unicode code pages are valid with Internet Information Services 5.0


 
Old March 16th, 2004, 12:50 AM
Authorized User
 
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar!

following code is working finally. :)

<%@ LANGUAGE = VBSCRIPT %>

<td><input style="font-family:'DV-TTYogeshEN Bold'" type="text" id=txtVisitorFirstNameHindi name=txtVisitorFirstNameHindi size =30 value = <%=null%>></td>

Thanks for ur help. :)
Regards
Ashu






Similar Threads
Thread Thread Starter Forum Replies Last Post
Hindi language fonts in text box ashu_gupta75 Classic ASP Basics 4 April 24th, 2014 11:19 AM
Count in combo box(display results in text box) mboyisis Access 4 April 4th, 2008 07:08 AM
Convert English Char To Hindi Language in PHP Plz maheshoo7 PHP How-To 1 June 26th, 2007 10:21 AM
Language change in Text box nishab345 VB How-To 0 June 26th, 2007 09:13 AM
Hindi language fonts in text box ashu_gupta75 Classic ASP Basics 1 March 15th, 2004 05:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.