How do I convert a troff manpage with UTF-8 characters (czech to be precise) to PDF
Clash Royale CLAN TAG#URR8PPP
up vote
3
down vote
favorite
I have a troff document (manpage) with UTF-8 characters and I am trying to convert it to a PDF. However, when using the -Tpdf option, the PDF generated does not show the correct characters. This is the command I am using:
groff -k -Tutf-8 -pet -Tpdf -mandoc filename.1 > filename.pdf
Examples of what goes wrong:
"PouÃ
¾ÃÂvá" becomes "Pou3âÂÂ4ÃÂvá"
"pÃ
ÂekladaÃÂ" becomes "pøekladaè"
"provádÃÂných" becomes "provádìných"
"rozÃ
¡ÃÂÃ
ÂenÃÂm" becomes "roz1ÃÂøenÃÂm"
How to do it correctly?
pdf unicode conversion groff roff
add a comment |Â
up vote
3
down vote
favorite
I have a troff document (manpage) with UTF-8 characters and I am trying to convert it to a PDF. However, when using the -Tpdf option, the PDF generated does not show the correct characters. This is the command I am using:
groff -k -Tutf-8 -pet -Tpdf -mandoc filename.1 > filename.pdf
Examples of what goes wrong:
"PouÃ
¾ÃÂvá" becomes "Pou3âÂÂ4ÃÂvá"
"pÃ
ÂekladaÃÂ" becomes "pøekladaè"
"provádÃÂných" becomes "provádìných"
"rozÃ
¡ÃÂÃ
ÂenÃÂm" becomes "roz1ÃÂøenÃÂm"
How to do it correctly?
pdf unicode conversion groff roff
1
Are you sure you want-Tutf-8
? From a glance at the manual, it seems like your two-T
options might be conflicting, and-D
is used to select a charset
â Fox
Apr 25 '17 at 20:13
Ah, sorry, I am not sure, I was just already very desparate. Using -D utf-8 makes the problematic characters disappear completely, resulting in 'can't find special character' warnings
â magnusi
Apr 25 '17 at 21:34
1
What about-K utf-8
?
â Gilles
Apr 25 '17 at 22:06
I'm testing things now. Interestingly, if I use-D utf-8
or-K utf-8
along with-T utf-8
, I can see the Czech symbols, but when I change-T utf-8
to-T ps
or-T pdf
the problem arises. Sogrotty
acts fine with Unicode, butgrops
andgropdf
are having trouble
â Fox
Apr 25 '17 at 22:38
1
See also The Linux Documentation Project stating thatgroff -Tps
is only capable of outputting the Unicode characters that "PostScript supports by itself" (though it doesn't specify which version ofgroff
). Since PDF is just compiled PostScript, this is probably the issue.
â Fox
Apr 25 '17 at 23:10
add a comment |Â
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have a troff document (manpage) with UTF-8 characters and I am trying to convert it to a PDF. However, when using the -Tpdf option, the PDF generated does not show the correct characters. This is the command I am using:
groff -k -Tutf-8 -pet -Tpdf -mandoc filename.1 > filename.pdf
Examples of what goes wrong:
"PouÃ
¾ÃÂvá" becomes "Pou3âÂÂ4ÃÂvá"
"pÃ
ÂekladaÃÂ" becomes "pøekladaè"
"provádÃÂných" becomes "provádìných"
"rozÃ
¡ÃÂÃ
ÂenÃÂm" becomes "roz1ÃÂøenÃÂm"
How to do it correctly?
pdf unicode conversion groff roff
I have a troff document (manpage) with UTF-8 characters and I am trying to convert it to a PDF. However, when using the -Tpdf option, the PDF generated does not show the correct characters. This is the command I am using:
groff -k -Tutf-8 -pet -Tpdf -mandoc filename.1 > filename.pdf
Examples of what goes wrong:
"PouÃ
¾ÃÂvá" becomes "Pou3âÂÂ4ÃÂvá"
"pÃ
ÂekladaÃÂ" becomes "pøekladaè"
"provádÃÂných" becomes "provádìných"
"rozÃ
¡ÃÂÃ
ÂenÃÂm" becomes "roz1ÃÂøenÃÂm"
How to do it correctly?
pdf unicode conversion groff roff
pdf unicode conversion groff roff
edited Apr 25 '17 at 22:07
Gilles
518k12410341563
518k12410341563
asked Apr 25 '17 at 19:37
magnusi
161
161
1
Are you sure you want-Tutf-8
? From a glance at the manual, it seems like your two-T
options might be conflicting, and-D
is used to select a charset
â Fox
Apr 25 '17 at 20:13
Ah, sorry, I am not sure, I was just already very desparate. Using -D utf-8 makes the problematic characters disappear completely, resulting in 'can't find special character' warnings
â magnusi
Apr 25 '17 at 21:34
1
What about-K utf-8
?
â Gilles
Apr 25 '17 at 22:06
I'm testing things now. Interestingly, if I use-D utf-8
or-K utf-8
along with-T utf-8
, I can see the Czech symbols, but when I change-T utf-8
to-T ps
or-T pdf
the problem arises. Sogrotty
acts fine with Unicode, butgrops
andgropdf
are having trouble
â Fox
Apr 25 '17 at 22:38
1
See also The Linux Documentation Project stating thatgroff -Tps
is only capable of outputting the Unicode characters that "PostScript supports by itself" (though it doesn't specify which version ofgroff
). Since PDF is just compiled PostScript, this is probably the issue.
â Fox
Apr 25 '17 at 23:10
add a comment |Â
1
Are you sure you want-Tutf-8
? From a glance at the manual, it seems like your two-T
options might be conflicting, and-D
is used to select a charset
â Fox
Apr 25 '17 at 20:13
Ah, sorry, I am not sure, I was just already very desparate. Using -D utf-8 makes the problematic characters disappear completely, resulting in 'can't find special character' warnings
â magnusi
Apr 25 '17 at 21:34
1
What about-K utf-8
?
â Gilles
Apr 25 '17 at 22:06
I'm testing things now. Interestingly, if I use-D utf-8
or-K utf-8
along with-T utf-8
, I can see the Czech symbols, but when I change-T utf-8
to-T ps
or-T pdf
the problem arises. Sogrotty
acts fine with Unicode, butgrops
andgropdf
are having trouble
â Fox
Apr 25 '17 at 22:38
1
See also The Linux Documentation Project stating thatgroff -Tps
is only capable of outputting the Unicode characters that "PostScript supports by itself" (though it doesn't specify which version ofgroff
). Since PDF is just compiled PostScript, this is probably the issue.
â Fox
Apr 25 '17 at 23:10
1
1
Are you sure you want
-Tutf-8
? From a glance at the manual, it seems like your two -T
options might be conflicting, and -D
is used to select a charsetâ Fox
Apr 25 '17 at 20:13
Are you sure you want
-Tutf-8
? From a glance at the manual, it seems like your two -T
options might be conflicting, and -D
is used to select a charsetâ Fox
Apr 25 '17 at 20:13
Ah, sorry, I am not sure, I was just already very desparate. Using -D utf-8 makes the problematic characters disappear completely, resulting in 'can't find special character' warnings
â magnusi
Apr 25 '17 at 21:34
Ah, sorry, I am not sure, I was just already very desparate. Using -D utf-8 makes the problematic characters disappear completely, resulting in 'can't find special character' warnings
â magnusi
Apr 25 '17 at 21:34
1
1
What about
-K utf-8
?â Gilles
Apr 25 '17 at 22:06
What about
-K utf-8
?â Gilles
Apr 25 '17 at 22:06
I'm testing things now. Interestingly, if I use
-D utf-8
or -K utf-8
along with -T utf-8
, I can see the Czech symbols, but when I change -T utf-8
to -T ps
or -T pdf
the problem arises. So grotty
acts fine with Unicode, but grops
and gropdf
are having troubleâ Fox
Apr 25 '17 at 22:38
I'm testing things now. Interestingly, if I use
-D utf-8
or -K utf-8
along with -T utf-8
, I can see the Czech symbols, but when I change -T utf-8
to -T ps
or -T pdf
the problem arises. So grotty
acts fine with Unicode, but grops
and gropdf
are having troubleâ Fox
Apr 25 '17 at 22:38
1
1
See also The Linux Documentation Project stating that
groff -Tps
is only capable of outputting the Unicode characters that "PostScript supports by itself" (though it doesn't specify which version of groff
). Since PDF is just compiled PostScript, this is probably the issue.â Fox
Apr 25 '17 at 23:10
See also The Linux Documentation Project stating that
groff -Tps
is only capable of outputting the Unicode characters that "PostScript supports by itself" (though it doesn't specify which version of groff
). Since PDF is just compiled PostScript, this is probably the issue.â Fox
Apr 25 '17 at 23:10
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
The following convoluted way works:
groff -Kutf8 -Tdvi -mec -ms test.ms > test.dvi
dvipdfm -cz 9 test.dvi
open test.pdf
Via the [Groff] latin2 polish special characters thread on lists.gnu.org.
New contributor
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
The following convoluted way works:
groff -Kutf8 -Tdvi -mec -ms test.ms > test.dvi
dvipdfm -cz 9 test.dvi
open test.pdf
Via the [Groff] latin2 polish special characters thread on lists.gnu.org.
New contributor
add a comment |Â
up vote
1
down vote
The following convoluted way works:
groff -Kutf8 -Tdvi -mec -ms test.ms > test.dvi
dvipdfm -cz 9 test.dvi
open test.pdf
Via the [Groff] latin2 polish special characters thread on lists.gnu.org.
New contributor
add a comment |Â
up vote
1
down vote
up vote
1
down vote
The following convoluted way works:
groff -Kutf8 -Tdvi -mec -ms test.ms > test.dvi
dvipdfm -cz 9 test.dvi
open test.pdf
Via the [Groff] latin2 polish special characters thread on lists.gnu.org.
New contributor
The following convoluted way works:
groff -Kutf8 -Tdvi -mec -ms test.ms > test.dvi
dvipdfm -cz 9 test.dvi
open test.pdf
Via the [Groff] latin2 polish special characters thread on lists.gnu.org.
New contributor
New contributor
answered 11 mins ago
Marek Kowalczyk
134
134
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f361274%2fhow-do-i-convert-a-troff-manpage-with-utf-8-characters-czech-to-be-precise-to%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Are you sure you want
-Tutf-8
? From a glance at the manual, it seems like your two-T
options might be conflicting, and-D
is used to select a charsetâ Fox
Apr 25 '17 at 20:13
Ah, sorry, I am not sure, I was just already very desparate. Using -D utf-8 makes the problematic characters disappear completely, resulting in 'can't find special character' warnings
â magnusi
Apr 25 '17 at 21:34
1
What about
-K utf-8
?â Gilles
Apr 25 '17 at 22:06
I'm testing things now. Interestingly, if I use
-D utf-8
or-K utf-8
along with-T utf-8
, I can see the Czech symbols, but when I change-T utf-8
to-T ps
or-T pdf
the problem arises. Sogrotty
acts fine with Unicode, butgrops
andgropdf
are having troubleâ Fox
Apr 25 '17 at 22:38
1
See also The Linux Documentation Project stating that
groff -Tps
is only capable of outputting the Unicode characters that "PostScript supports by itself" (though it doesn't specify which version ofgroff
). Since PDF is just compiled PostScript, this is probably the issue.â Fox
Apr 25 '17 at 23:10