[Bug 289370] wcsxfrm() fails with EINVAL for some characters

[email protected] Mon, 08 Sep 2025 13:51:37 +0000
Newsgroups gmane.os.freebsd.devel.standards
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=289370

Mark Millard <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Mark Millard <[email protected]> ---
The issue is documented and far from new:

# man 3 wcsxfrm
WCSXFRM(3)             FreeBSD Library Functions Manual             WCSXFRM(3)
. . .
BUGS
     The current implementation of wcsxfrm() only works in single-byte
     LC_CTYPE locales, and falls back to using wcsncpy() in locales with
     extended character sets.

     Comparing two strings using wcscmp() after wcsxfrm() is not always
     equivalent to comparison with wcscoll(); wcsxfrm() only stores
     information about primary collation weights into dst, whereas wcscoll()
     compares characters using both primary and secondary weights.

FreeBSD 15.0-PRERELEASE         October 4, 2002                     WCSXFRM(3)

-- 
You are receiving this mail because:
You are the assignee for the bug.