Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF8 in TextField's value #5

Closed
kberry opened this issue May 18, 2016 · 3 comments
Closed

UTF8 in TextField's value #5

kberry opened this issue May 18, 2016 · 3 comments

Comments

@kberry
Copy link

kberry commented May 18, 2016

(reposted from https://puszcza.gnu.org.ua/bugs/index.php?204, author Thorsten )

Hi. I have the following packages:

\usepackage[ngerman]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

When I create a textfield with

\TextField[name=test, value=Groß]{test}

the value shows as "GroT1ss"

How can I fix this?

@u-fischer
Copy link
Member

The problem is not really related to utf8, \ss and similar commands break too.

Imho the problem is that the field value is not passed through \pdfstringdef. This is seems to solve the problem (but it is not very thoroughly tested):

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{textcomp}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\makeatletter
\define@key{Field}{value}{%
  \Hy@pdfstringdef\Fld@value{#1}%new
  %\def\Fld@value{#1}%old
}
\makeatother
\begin{document}

When I create a textfield with
\TextField[name=test, value=Größü€\ss]{test}
\end{document}

pdfstringdef

@davidcarlisle
Copy link
Member

@u-fischer thanks that looks about right, I'd seen it was unrelated to input encoding but not traced the interesting path the various escape mechanisms take.

davidcarlisle added a commit that referenced this issue May 24, 2016
@davidcarlisle
Copy link
Member

hyperref v6.83p uploaded to CTAN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants