From what I read, it appears that the SO posting is plain wrong. Consider, for example,
https://developer.gnome.org/glib/stable/glib-Character-Set-Conversion.html#g-filename-to-utf8
# Converts a string which is in the encoding used by GLib for filenames
# into a UTF-8 string. Note that on Windows GLib uses UTF-8 for filenames;
# on other platforms, this function indirectly depends on the current locale.
The SO author might have misread the part where it says that glib uses UTF-8 *on Windows* (instead of the braindead "ANSI" encoding indirection).