473,788 Members | 2,744 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What charset the IIS uses to decode POST request?

Hallo,

I am working on multilingual web-application, and I have to be very sure
about how the international characters are encoded and decoded in the
client-server form requests.

There's a great article about the issue:
http://ppewww.ph.gla.ac.uk/~flavell/...form-i18n.html

Generally, that states that this are is filled with landmines. From my tests
I see that form content upon POST request is encoded using the character
encoding from the html page that hosted the form. However, there is no
information about the used codepage in the POST request, and the server side
has somehow to guess it so that it can decode the data properly and populate
the Request.Form collection. My tests show that if the requester page is
plain html with utf-8 codepage Content-Type metatag, the serverside
sometimes does, but most time fails to decode the characters properly.

So, my question is, what codepage is used when interpreting and decoding the
POST request data anf Request.Form collection is populated? I cuold write my
own interpreter that takes the data out from Request.BinaryR ead(), but I
would prefer to use the default Request.Form collection tough.

Thanks,
-- Pavils
Jul 19 '05 #1
4 10562
My sympathies. You may have noticed my posts on this question, and also the
lack of any response. Yes, that link has a super discussion of the issue.

The route I took was to end-run the problem by converting the input at POST
time to 7-bit-safe stuff, filled into a hidden field. In addition to a
database record of the input, I was trying to generate data for an RTF file
as a possible output, and while the database contents were handled correctly
in both directions, I could find nothing on its format for purposes of
converting to the "hex Unicode" Code-page format that RTF requires.

That is, a two-byte UTF-8 Cyrillic character was converted to a 4-byte
value, and I couldn't discern the conversion algorithm. I expect it's
related to a double conversion. A couple of cuts at reverse-engineering
failed. If you succeed, pls share the solution.

FYI, I used the Javascript charCodeAt() function for the client-side
conversion. HTH a bit more than just sympathy.

AS
Jul 19 '05 #2
Hi, Pavils

ASP uses ANSI code page to decode source data. You have to explicitly
specify utf-8 code page to work correctly with form data:
<%@ Codepage=65001 %>

BTW. I worked a lot of time to create component working with form-data,
any code page, accepting up to 2GB of multipart and url-encoded form data
(Request.Form has a 100kB limit). You can find it at http://www.pstruh.cz
(Huge-ASP upload)

Antonin
"Pavils Jurjans" <pa****@mailbox .riga.lv> wrote in message
news:#i******** ******@TK2MSFTN GP12.phx.gbl...
Hallo,

I am working on multilingual web-application, and I have to be very sure
about how the international characters are encoded and decoded in the
client-server form requests.

There's a great article about the issue:
http://ppewww.ph.gla.ac.uk/~flavell/...form-i18n.html

Generally, that states that this are is filled with landmines. From my tests I see that form content upon POST request is encoded using the character
encoding from the html page that hosted the form. However, there is no
information about the used codepage in the POST request, and the server side has somehow to guess it so that it can decode the data properly and populate the Request.Form collection. My tests show that if the requester page is
plain html with utf-8 codepage Content-Type metatag, the serverside
sometimes does, but most time fails to decode the characters properly.

So, my question is, what codepage is used when interpreting and decoding the POST request data anf Request.Form collection is populated? I cuold write my own interpreter that takes the data out from Request.BinaryR ead(), but I
would prefer to use the default Request.Form collection tough.

Thanks,
-- Pavils

Jul 19 '05 #3
Thanks, Antonin,

This bit of info was the last one to complete my puzzle. Now I'm happy (tm).

Yes, I know of your site and the great components you have made. In this
case, I am looking for more tech insight on the POST format problems. I have
my own pure-ASP upload in JScript working very fine, and I prefer to stay
with pure code class, because then I have full control of what happens
inside.

Regards,

-- Pavils

"Antonin Foller" <an*****@foller .cz> wrote in message
news:ud******** *****@TK2MSFTNG P09.phx.gbl...
Hi, Pavils

ASP uses ANSI code page to decode source data. You have to explicitly
specify utf-8 code page to work correctly with form data:
<%@ Codepage=65001 %>

BTW. I worked a lot of time to create component working with form-data, any code page, accepting up to 2GB of multipart and url-encoded form data
(Request.Form has a 100kB limit). You can find it at http://www.pstruh.cz
(Huge-ASP upload)

Antonin

Jul 19 '05 #4
Arnold, I think I may help you with your issues. Just make you contactable,
mail me or ICQ: 4047612

-- Pavils

"Arnold Shore" <do**@bother.me > wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
My sympathies. You may have noticed my posts on this question, and also the lack of any response. Yes, that link has a super discussion of the issue.

The route I took was to end-run the problem by converting the input at POST time to 7-bit-safe stuff, filled into a hidden field. In addition to a
database record of the input, I was trying to generate data for an RTF file as a possible output, and while the database contents were handled correctly in both directions, I could find nothing on its format for purposes of
converting to the "hex Unicode" Code-page format that RTF requires.

That is, a two-byte UTF-8 Cyrillic character was converted to a 4-byte
value, and I couldn't discern the conversion algorithm. I expect it's
related to a double conversion. A couple of cuts at reverse-engineering
failed. If you succeed, pls share the solution.

FYI, I used the Javascript charCodeAt() function for the client-side
conversion. HTH a bit more than just sympathy.

AS

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2323
by: Tumurbaatar S. | last post by:
When a browser sends (get or post) a form data containing non-ASCII char-s (i.e. above 127), Request returns some char-s encoded like '&#nnn'. It seems that when I used a standard WindowsXP keyboard driver to type a non-English text, the char-s are not encoded. But when I copy/paste non-ascii char-s (e.g. from range 127..255, mostly Latin char-s with acute, grave and etc) from Character Map, then a browser sends them in '&#nnn' format....
7
3795
by: Art M | last post by:
I saved an html page the other day that encoded some punctuation with codes like â?T --> apostrophe (in case those characters don't show up in your news reader that's a_circumflex + euro + trademark) --Art
0
1409
by: webweaver_khries | last post by:
here is a piece of form field and an asp action codes so the thing is when i started working on this, at first it was working but after i formatted my c drive of my computer. i started recieving errors like this "operations must use an updateable query" here is the form part:- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"...
0
1245
by: Asha | last post by:
greetings, attach below are javascripts, if you notice there is a keyword called escape which encodes the entire file and pass onto another fill to be decoded. here are my implementation for javascript to encode and vb.net to decode it. the problem that i'm facing is that it wont decode the value pss in from javascript. although i'm able ot display it, but lots of encoded value. how can i decode this rpoblem? <SCRIPT language="JavaScript"> ...
0
1468
by: steve mettraux | last post by:
I have this kind of string, dim myString as string = " =E0 ton essai d'=E9tablir une" i know the kind of encoding, here I have iso-8859-1 dim charset as string ="iso-8859-1" how to decode it?
1
4450
by: Prosper0 | last post by:
Hello, I have a problem sending special characters from a form to another page. The sending page is in ISO-8859-1 (meta tag), and the recieving page too. (Using post) The characters show OK in the sending page (in textboxes), characters are eg: å (a with a ring, &Aring; ) ä (a with two dots, &auml; ) ö (o with two dots, &ouml; ) etc.
4
2063
by: mistral | last post by:
Can anyone help to identify what this encryption used in this script? <html> <body> <script type="text/javascript" language="JavaScript"> function decrypt_p(x){ var l=x.length, b=1024, i,j,r, p=0,
3
1367
by: Gandalf | last post by:
now I understand my problem better so their is a good chance you manage to help me. I have a SQlite database full with ANSI Hebrew text , and program that uses WXpython Now, I use a- 'wx.TextCtrl' item to receive input from the user, and when I try to search the database he don't understand this chars. it's quite reasonable consider the fact the program set to work on UTF-8 charset, except for:
0
9498
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10177
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7519
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3677
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2897
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.