[m-rev.] for review: Announce recent changes to string type and string module.
Peter Wang
novalazy at gmail.com
Mon Nov 18 11:34:45 AEDT 2019
NEWS:
Announce changes regarding ill-formed code unit sequences in
strings.
library/string.m:
Delete a note about ongoing work.
diff --git a/NEWS b/NEWS
index f41c9fb8e..b9f1b132a 100644
--- a/NEWS
+++ b/NEWS
@@ -462,6 +462,12 @@ Changes to the Mercury standard library:
- foldr_substring/5
- foldr_substring/6
+* The string type has been defined to permit ill-formed code unit sequences.
+ Predicates and functions in the string module now have defined behaviours
+ for strings containing ill-formed sequences. Also, some predicates and
+ functions now have defined behaviour on surrogate code points
+ (e.g. failing or throwing an exception) that was previously undefined.
+
* The following predicates have been added to the map module:
- foldl5/12
diff --git a/library/string.m b/library/string.m
index 15800250c..a93578cce 100644
--- a/library/string.m
+++ b/library/string.m
@@ -7,7 +7,7 @@
%---------------------------------------------------------------------------%
%
% File: string.m.
-% Main authors: fjh, petdr.
+% Main authors: fjh, petdr, wangp.
% Stability: medium to high.
%
% This modules provides basic string handling facilities.
@@ -32,8 +32,7 @@
% UTF-8 or UTF-16 via I/O, foreign code, and substring operations.
% Predicates or functions that inspect strings may fail, throw an exception,
% or else behave in some special way when an ill-formed code unit sequence is
-% encountered. Handling ill-formed sequences consistently in this module is
-% ongoing work.
+% encountered.
%
% Unexpected null characters embedded in the middle of strings can be a source
% of security vulnerabilities, so the Mercury library predicates and functions
--
2.23.0
More information about the reviews
mailing list