 |
| 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
|
|
|
|

March 15th, 2004, 04:23 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 15th, 2004, 05:20 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

March 15th, 2004, 05:34 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for the prompt reply Imar!
But the code is still not working even though I can see this font in Control Panel->Fonts.
|
|

March 15th, 2004, 05:38 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

March 15th, 2004, 05:56 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi Imar!
the code is still not working. wot should i do?
regards
ashu
|
|

March 15th, 2004, 06:13 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

March 15th, 2004, 06:34 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 15th, 2004, 06:58 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
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.
|
|

March 15th, 2004, 07:12 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|

March 16th, 2004, 12:50 AM
|
|
Authorized User
|
|
Join Date: Jan 2004
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
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
|
|
 |