svn commit: r1934408 - subversion/trunk/subversion/libsvn_subr
| Newsgroups | gmane.comp.version-control.subversion.svn |
|---|---|
| Message-ID | <177921237653.886579.10168354861611698832@svn03-he-fi> |
Author: rinrab
Date: Tue May 19 17:39:36 2026
New Revision: 1934408
Log:
Remove unneeded extra check of a UTF-8 string for validity, because
utf8proc_iterate() does it for us.
* subversion/libsvn_subr/utf8proc.c
(svn_utf_cstring_utf8_width): Don't call svn_utf__cstring_is_valid().
Modified:
subversion/trunk/subversion/libsvn_subr/utf8proc.c
Modified: subversion/trunk/subversion/libsvn_subr/utf8proc.c
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf8proc.c Tue May 19 17:36:19 2026 (r1934407)
+++ subversion/trunk/subversion/libsvn_subr/utf8proc.c Tue May 19 17:39:36 2026 (r1934408)
@@ -614,10 +614,6 @@ svn_utf_cstring_utf8_width(const char *c
if (*cstr == '\0')
return 0;
- /* Ensure the conversion below doesn't fail because of encoding errors. */
- if (!svn_utf__cstring_is_valid(cstr))
- return -1;
-
/* Convert the UTF-8 string to UTF-32 (UCS4) which is the format
* utf8proc_charwidth() expects, and get the width of each character.
* We don't need much error checking since the input is valid UTF-8. */