@cindex locale-dependent string equivalence
@defun string-collate-equalp string1 string2 &optional locale ignore-case
This function returns @code{t} if @var{string1} and @var{string2} are
-equal with respect to collation rules. A collation rule is not only
+equal with respect to the collation rules of the specified
+@var{locale}, which defaults to your current system locale. A
+collation rule is not only
determined by the lexicographic order of the characters contained in
-@var{string1} and @var{string2}, but also further rules about
+@var{string1} and @var{string2}, but also by further rules about
relations between these characters. Usually, it is defined by the
-@var{locale} environment Emacs is running with and by the Standard C
+locale environment with which Emacs is running and by the Standard C
library against which Emacs was linked@footnote{
For more information about collation rules and their locale
dependencies, see @uref{https://unicode.org/reports/tr10/, The Unicode
systems, while it would be, e.g., @code{"enu_USA.1252"} on MS-Windows
systems.
-If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case
-before comparing them.
+If @var{ignore-case} is non-@code{nil}, characters are compared
+case-insensitively, by converting them to lower-case. However, if the
+underlying system library doesn't provide locale-specific collation
+rules, this function falls back to @code{string-equal}, in which case
+the @var{ignore-case} argument is ignored, and the comparison will
+always be case-sensitive.
@vindex w32-collate-ignore-punctuation
To emulate Unicode-compliant collation on MS-Windows systems,
@cindex locale-dependent string comparison
@defun string-collate-lessp string1 string2 &optional locale ignore-case
This function returns @code{t} if @var{string1} is less than
-@var{string2} in collation order. A collation order is not only
+@var{string2} in collation order of the specified @var{locale}, which
+defaults to your current system locale. A collation order is not only
determined by the lexicographic order of the characters contained in
-@var{string1} and @var{string2}, but also further rules about
+@var{string1} and @var{string2}, but also by further rules about
relations between these characters. Usually, it is defined by the
-@var{locale} environment Emacs is running with.
+locale environment with which Emacs is running, and by the Standard C
+library against which Emacs was linked.
For example, punctuation and whitespace characters might be ignored
for sorting (@pxref{Sequence Functions}):
@end group
@end example
-If @var{ignore-case} is non-@code{nil}, characters are converted to lower-case
-before comparing them.
+If @var{ignore-case} is non-@code{nil}, characters are compared
+case-insensitively, by converting them to lower-case. However, if the
+underlying system library doesn't provide locale-specific collation
+rules, this function falls back to @code{string-lessp}, in which case
+the @var{ignore-case} argument is ignored, and the comparison will
+always be case-sensitive.
To emulate Unicode-compliant collation on MS-Windows systems,
bind @code{w32-collate-ignore-punctuation} to a non-@code{nil} value, since