diff --git a/lib/src/charset.dart b/lib/src/charset.dart index 92d6bd4..6be3564 100644 --- a/lib/src/charset.dart +++ b/lib/src/charset.dart @@ -359,6 +359,8 @@ class Charset { encoding.encode(char); } on FormatException catch (_) { return false; + } on ArgumentError catch (_) { + return false; } return true; } @@ -369,6 +371,8 @@ class Charset { encoding.decode(char); } on FormatException catch (_) { return false; + } on ArgumentError catch (_) { + return false; } return true; }