Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8996921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:49:08+00:00 2026-06-15T23:49:08+00:00

When I create a PDF form (for instance using Acrobat) that contains text fields

  • 0

When I create a PDF form (for instance using Acrobat) that contains text fields in AcroForm format (PDF dictionaries, no XFA), and I submit the data to a server, how can I specify/retrieve the encoding that will be used?

For instance. When I submit the Chinese glyphs ‘测试’ (test), I receive the following headers and content on the server-side:

accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
content-type: application/x-www-form-urlencoded
content-length: 23
acrobat-version: 10.1.4
user-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; .NET4.0C; AskTbCLA/5.15.1.22229)
accept-encoding: gzip, deflate
connection: Keep-Alive
Song=%b2%e2%ca%d4&Test=

There’s no reference to an encoding, except x-www-form-urlencoded. The two glyphs are represented as four bytes: B2 E2 CA D4. After some investigation, I know that B2E2 is the GBK value for the first glyph, and CAD4 the GBK value for the second glyph, but I can’t derive this from the request header.

Is it always GBK? I want to change the data encoding by setting a specific key in a dictionary in the PDF, but there doesn’t seem to be any. For instance: I would like make sure the PDF always sends Unicode characters instead of GBK.

Note that I’ve already experimented by changing the default font (and encoding) of the text field. I’ve also searched ISO-32000-1 for encodings in fields, but all I found was a way to define non-Latin characters for check boxes, and some info about the encoding of an FDF file. None of which answered my questions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T23:49:08+00:00Added an answer on June 15, 2026 at 11:49 pm

    I’ve just found the answer to my main question myself. I didn’t find anything in ISO-32000-1 or the ISO-32000-2 draft, but studying the Acrobat JavaScript reference, I found the cCharset parameter that is available for the submitForm() method. That parameter defines:

    The encoding for the values submitted. String values are utf-8,
    utf-16, Shift-JIS, BigFive, GBK, and UHC. If not passed, the current
    Acrobat behavior applies. For XML-based formats, utf-8 is used. For
    other formats, Acrobat tries to find the best host encoding for the
    values being submitted. XFDF submission ignores this value and always
    uses utf-8.

    In other words: in my case GBK was used because it fits best to submit Chinese characters. However, one could force UTF-8 by using the submitForm() JavaScript method using the appropriate value.

    Based on this question, I have asked the ISO committee to fix this problem in ISO-32000-2.
    As a result, an extra possible entry was added to the table entitled Additional entries specific to a submit-form action in section 12.7.6.2:

    CharSet: string

    (Optional; inheritable) Possible values include: utf-8, utf-16,
    Shift-JIS, BigFive, GBK, or UHC.

    Starting with PDF 2.0, this problem will no longer exist.

    Update: my suggestion made ISO 32000-2 (aka PDF 2.0):

    enter image description here

    The CharSet key doesn’t exist in ISO 32000-1; it was introduced in ISO 32000-2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using PDF, is it possible to create a single form element with multiple fields
Can we create interactive PDF forms using reportlab? That is, a form that takes
I want to programmatically fill in some fields in a form in PDF format.
I have an application that uses itextsharp to fill PDF form fields. I got
I have a button when clicked, inserts text into form fields in a pdf
I'm using fpdf to create some pdf's from a HTML-form. Everything is working fine
Is there any to fill PDF form fields using an Excel Data source? (Think
I'm using iTextsharp library to create PDF files. I can declare for A4 Landscape
I'm currently converting some legacy code to create PDF files using iTextSharp. We're creating
I create a PDF file using iTextSharp and it's stored in my system desktop

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.