readdir() returns inaccessible name if file was created with invalid UTF-8

Brian Inglis Brian.Inglis@SystematicSW.ab.ca
Thu Jul 24 22:33:26 GMT 2025


On 2025-07-24 09:36, Corinna Vinschen via Cygwin wrote:
> On Jul 24 09:28, Brian Inglis via Cygwin wrote:
>> On 2025-07-24 04:30, Corinna Vinschen via Cygwin wrote:
>>> Or shall simply go along with CESU-8 when converting back to multibyte
>>> to keep the string the same as with wcstombs?
>>
>> There are 15 * SMP as BMP characters, so many non-Western and emoji
>> characters will be expanded from 4 UTF-8 bytes to 6 CESU-8 bytes, and this
>> is not supported anywhere as a string representation, designed for internal
>> use only per the TR.
> 
> We're only talking about invalid sequences, not using CESU-8 throughout.

That was not clear, so then as they say "go along to get along"? ;^>

-- 
Take care. Thanks, Brian Inglis              Calgary, Alberta, Canada

La perfection est atteinte                   Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter  not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher  but when there is no more to cut
                                 -- Antoine de Saint-Exupéry


More information about the Cygwin mailing list