* [PATCH] tools: add more entities and better error handling to parse_companies
@ 2016-08-11 20:19 Mike Ryan
2016-09-15 20:06 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Mike Ryan @ 2016-08-11 20:19 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Mike Ryan
Add the remaining lowercase acute accented vowel HTML entities to
parse_companies.pl. On unknown entity, print an error to STDERR so the
maintainer can more clearly understand the failure.
---
tools/parse_companies.pl | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tools/parse_companies.pl b/tools/parse_companies.pl
index 99d3f31..d5b2815 100755
--- a/tools/parse_companies.pl
+++ b/tools/parse_companies.pl
@@ -8,7 +8,11 @@ use strict;
my %known_entities = (
'nbsp' => ' ',
+ 'aacute' => 'á',
'eacute' => 'é',
+ 'iacute' => 'í',
+ 'oacute' => 'ó',
+ 'uacute' => 'ú',
'auml' => 'ä',
'uuml' => 'ü',
'Uuml' => 'Ü',
@@ -23,8 +27,7 @@ sub uri_decode {
}
foreach my $entity (map { lc $_ } $name =~ /&([^;]+);/g) {
if ($entity ne 'amp') {
- print "Unable to convert &$entity;, giving up\n";
- exit 1;
+ die "\nparse_companies.pl: Unable to convert &$entity; giving up\n";
}
}
$name =~ s/&/&/ig;
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tools: add more entities and better error handling to parse_companies
2016-08-11 20:19 [PATCH] tools: add more entities and better error handling to parse_companies Mike Ryan
@ 2016-09-15 20:06 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2016-09-15 20:06 UTC (permalink / raw)
To: Mike Ryan; +Cc: linux-bluetooth
Hi Mike,
> Add the remaining lowercase acute accented vowel HTML entities to
> parse_companies.pl. On unknown entity, print an error to STDERR so the
> maintainer can more clearly understand the failure.
> ---
> tools/parse_companies.pl | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
patch has been applied.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-15 20:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-11 20:19 [PATCH] tools: add more entities and better error handling to parse_companies Mike Ryan
2016-09-15 20:06 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.