Special characters are replaced with underscore when copying to FAT/NTFS
Steps to reproduce:
- Create a file named with accents or special characters, e.g.
demonstração.txt
- Copy it to a FAT or NTFS partition (mounted via fstab here)
- Copy is created as
demonstra____o.txt
This regression was introduced by 9f7aca2e. The problem is iterating over each character of a multibyte string (UTF-8) as if it was ascii.
My suggestion is to either you skip this treatment when g_str_is_ascii
returns FALSE
(this could render the fix useless) or use g_utf8_*
and g_unichar_*
functions.