On Sun, Feb 20, 2022 at 01:10:16PM +0100, Patrice Dumas wrote:
>
> I think that the correct way to do that is to use
> Encode::encode($text, 'utf-8');
> Also I think that it should be done as late as possible, so it would be
> better on $possible_file.
It is Encode::encode('utf-8', $text), but in my tests it does not work.
Only utf8::downgrade() work, although it should probably not be the
function used as it converts to some 8-bit encoding but we are not sure
that it converts to utf-8. I am puzzled.
--
Pat