Page MenuHomeFreeBSD

Unbreak libxo's handling of characters not representable in current locale
ClosedPublic

Authored by kan on Jun 13 2015, 1:34 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Mar 9, 2:24 AM
Unknown Object (File)
Sat, Mar 9, 2:24 AM
Unknown Object (File)
Sat, Mar 9, 2:23 AM
Unknown Object (File)
Sat, Mar 9, 2:11 AM
Unknown Object (File)
Dec 23 2023, 7:47 AM
Unknown Object (File)
Aug 30 2023, 6:07 AM
Unknown Object (File)
Aug 30 2023, 6:06 AM
Unknown Object (File)
Aug 30 2023, 6:06 AM
Subscribers

Details

Summary

The xo_format_string_direct function loops forever never advancing the processed string pointer
when it encounters a character that makes mbrtowc fail. Make it emit '?' character instead, as
it seems this is what the code intent was, sans bugs.

Test Plan

Create file in UTF-8 locate, try to ls directory with that file under, say. KOI8-R locale. Observe ls getting unhappy without the patch. Observe it printing '?' with the patch.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kan retitled this revision from to Unbreak libxo's handling of characters not representable in current locale.
kan updated this object.
kan edited the test plan for this revision. (Show Details)
kan set the repository for this revision to rS FreeBSD src repository - subversion.
marcel edited edge metadata.

LGTM. I'll forward to Phil.

This revision is now accepted and ready to land.Jun 13 2015, 2:47 AM
This revision was automatically updated to reflect the committed changes.