What makes you think that the posted data is going to be in UTF8?   You have 
clearly made an ASSUMPTION that isn’t true ☹.

Leonard

From: nikhs [mailto:[email protected]]
Sent: Monday, September 24, 2012 8:32 AM
To: [email protected]
Subject: [iText-questions] Multilanguage Characters Issue

I am using SUBMIT_HTML_FORM property to submit the content entered in PDF form.

My Code: pff.SetAdditionalActions(PdfName.U,PdfAction.CreateSubmitForm(strURL, 
null, PdfAction.SUBMIT_HTML_FORMAT));

I retrieve the submitted content using REQUEST object.

Code:

public List PDFOpenFromBuf(HttpRequest httpRequest) { List xmlParse = null; 
string fieldValue = string.Empty; string fieldName = string.Empty; UTF8Encoding 
utf8Encoding = new UTF8Encoding(); byte[] pdfData = 
httpRequest.BinaryRead(httpRequest.TotalBytes); string pdfByteData = 
ReadByteData(pdfData);

The retrieved data does not come in the proper encoding.

For example, If I type 测试 in the field then request object shows it as 
%b2%e2%ca%d4

The issue seems to be in the text not getting submitted in unicode format. Help 
us in correcting the same.

The issue is reproducible at http://itextpdf.com:8180/book/submit_me.pdf In 
this page enter 测试 and then post and you would see the data getting printed in 
non recognizable format.

Please help!
________________________________
View this message in context: Multilanguage Characters 
Issue<http://itext-general.2136553.n4.nabble.com/Multilanguage-Characters-Issue-tp4656433.html>
Sent from the iText - General mailing list 
archive<http://itext-general.2136553.n4.nabble.com/> at Nabble.com.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to