fl_filename_list is not UTF-8 safe

11 views
Skip to first unread message

Gonzalo Garramuño

unread,
May 14, 2024, 3:51:30 PMMay 14
to fltkc...@googlegroups.com
It seems it can return a non UTF-8 dirent filename that makes Pango
choke on it, at least on Linux.

It should probably call setlocale(LC_ALL, "en_US.UTF-8"); in
fl_filename_list() and restore the locale on fl_filename_free_list().

It is choking on this filename (not sure if it will go through mail
properly):

The\ Walking\ Dead\ -\ VR\ 360°\ video!-nRQsn_qd2Vs.webm

--
Gonzalo Garramuño
ggar...@gmail.com

Gonzalo Garramuño

unread,
May 14, 2024, 4:24:57 PMMay 14
to fltkc...@googlegroups.com

On 14/5/24 16:51, Gonzalo Garramuño wrote:
> It seems it can return a non UTF-8 dirent filename that makes Pango
> choke on it, at least on Linux.
>
> It should probably call setlocale(LC_ALL, "en_US.UTF-8"); in
> fl_filename_list() and restore the locale on fl_filename_free_list().
Never mind.  It is my mistake I think.

--
Gonzalo Garramuño
ggar...@gmail.com

Reply all
Reply to author
Forward
0 new messages