473,505 Members | 13,982 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASPSmartUpload Codepage Property Error

6 New Member
Hi,

I've seen various forum posts that mention the ability to set ASPSmaryUpload's Codepage property in order to handle UTF-8 and other character encodings.
Example: http://www.thescripts.com/forum/thread102044.html

I'd like to set this property so that foreign characters in form submissions are posted correctly especially for text fields.

When I try doing it, I receive the following message:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'CodePage'


My code is as follows:
Expand|Select|Wrap|Line Numbers
  1. Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
  2. mySmartUpload.CodePage = "UTF-8"
  3. mySmartUpload.Upload
  4.  
I also have the encoding set in the meta tags as mentioned in other ASPSmartUpload FAQ's:
Expand|Select|Wrap|Line Numbers
  1. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Is there something I need to do to enable this property?
I'd like to use this object if at all possible since that's what we have currently but if it's not possible to get this working, is there another object someone might suggest I could try?

Thank you!
Mar 22 '08 #1
2 5986
markrawlingson
346 Recognized Expert Contributor
[font=Arial]As I understand it, CodePage only accepts numerical integers for its values. So try the following directive at the top of your page. 65001 refers to UTF-8. You can also try using the LCID which will change character encoding, financial signs, etc etc. Do some google searches for LCID and CodePage values to see if you can find the integer values that refer to the country you want to set this for. It's also important to note that Response.CodePage affects only the page that is being run whereas Session.CodePage affects all pages within the Session state.[/font]

[font=Arial]
Expand|Select|Wrap|Line Numbers
  1. <%@ CodePage=65001 Language="VBScript"%>
  2. <%
  3. '((65001 indicates UTF-8))
  4. 'You can also use the CharSet method to perform the same action..
  5. Response.CharSet = "utf-8"
  6. %>
  7.  
[/font]

[font=Arial]Also, an easier way to add utf-8 encoding to your pages is to add it to the directory in IIS rather than adding it to each file individually. Right click the folder you want to add it to (Usually the root so it has global effectiveness --> properties --> HTTP Headers --> Add --> Custom Header Name = "Content-Type" --> Custom Header Value = "text/html; charset=utf-8" --> ok --> ok[/font]

You can also set Session.CodePage = 65001 in the Session_OnStart sub of your global.asa

Hope this helps.

Sincerely,
Mark
Mar 22 '08 #2
MitchellEr
6 New Member
These suggestions are very helpful. Thank you!

[font=Arial]As I understand it, CodePage only accepts numerical integers for its values. So try the following directive at the top of your page. 65001 refers to UTF-8. You can also try using the LCID which will change character encoding, financial signs, etc etc. Do some google searches for LCID and CodePage values to see if you can find the integer values that refer to the country you want to set this for. It's also important to note that Response.CodePage affects only the page that is being run whereas Session.CodePage affects all pages within the Session state.[/font]

[font=Arial]
Expand|Select|Wrap|Line Numbers
  1. <%@ CodePage=65001 Language="VBScript"%>
  2. <%
  3. '((65001 indicates UTF-8))
  4. 'You can also use the CharSet method to perform the same action..
  5. Response.CharSet = "utf-8"
  6. %>
  7.  
[/font]

[font=Arial]Also, an easier way to add utf-8 encoding to your pages is to add it to the directory in IIS rather than adding it to each file individually. Right click the folder you want to add it to (Usually the root so it has global effectiveness --> properties --> HTTP Headers --> Add --> Custom Header Name = "Content-Type" --> Custom Header Value = "text/html; charset=utf-8" --> ok --> ok[/font]

You can also set Session.CodePage = 65001 in the Session_OnStart sub of your global.asa

Hope this helps.

Sincerely,
Mark
Mar 24 '08 #3

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

Similar topics

4
7545
by: Steve Kushubar | last post by:
I originally posted this in the internet.iis group and it was suggested that I repost it here. I am trying to use the Response.CodePage method on a Windows 2000 IIS Server. The MSDN clearly...
3
6919
by: cam | last post by:
Hi: How can I rename the file being uploaded using ASPSmartUpload? I can set the other parameters ok, just looking for the syntax to rename the file. E.G. User uploading GIF file. I'd like...
2
13808
by: Jake | last post by:
Hi group, I am trying to build a page that allows uploading My ISP only supports Smartupload I am testing on a small hubbed local network, with PWS Any help is appreciated....
0
2357
by: Jake | last post by:
Hi All, > Hi experts, > > I am trying to build a page that allows file uploading from a browser > My ISP where the page will be located, only supports Smartupload > I am testing on a small...
2
6096
by: SayMyName | last post by:
Due to my browser being danishm the error message will not mean much t most of you. It is an "Unspecified problem" with "Provide (0x80004005)" POST Data: error '80020009' The error only arrives...
2
2567
by: SayMyName | last post by:
Due to my browser being danishm the error message will not mean much to most of you. It is an "Unspecified problem" with "Provider (0x80004005)" POST Data: error ''80020009'' The error only...
0
1810
by: asklucas | last post by:
Hi there, I got an MS Access DB, which is causing problems when the client PC is running using a Traditional Chinese codepage. The DB was probably created with Access 97, Western European...
4
6238
by: david | last post by:
I am getting the following error: Error Type: ADODB.Field (0x800A0BB9) Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. When this code...
4
5255
by: =?Utf-8?B?VG9kZA==?= | last post by:
I am using Windows XP and have registered the aspsmartupload dll and moved it into the system32 directory. I get the following error Error Type: Microsoft OLE DB Provider for ODBC Drivers...
0
7216
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
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7018
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
7471
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...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4699
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...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
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 ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.