From: AndrĂ© Hentschel Subject: c2man: Fix UTF-8 characters in recognized contributers Message-Id: <53FD0722.2020206@dawncrow.de> Date: Wed, 27 Aug 2014 00:16:02 +0200 --- tools/c2man.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/c2man.pl b/tools/c2man.pl index fba17ab..9772849 100755 --- a/tools/c2man.pl +++ b/tools/c2man.pl @@ -28,6 +28,8 @@ use strict; use bytes; +use Encode; +use HTML::Entities; # Function flags. most of these come from the spec flags my $FLAG_DOCUMENTED = 1; @@ -1144,7 +1146,7 @@ sub output_spec($) my $source_details = $source_files{$source_file}[0]; for (@{$source_details->{CONTRIBUTORS}}) { - push (@contributors, $_); + push (@contributors, HTML::Entities::encode_numeric(Encode::decode("UTF-8", $_))); } } @@ -1588,7 +1590,7 @@ sub output_api_comment($) if ($opt_output_format eq "h" || $opt_output_format eq "s" || $opt_output_format eq "x") { # Map special characters - s/\&/\&/g; + s/\&(?!#)/\&/g; s/\/\>/g; s/\([Cc]\)/\©/g;