Replacement characters (0xFFFD) in file properties dialog
Affected version
- Nightly flatpak: Yes
- Other: 43.0
Steps to reproduce
- Run nautilus in Chinese language.
LANGUAGE=zh_CN nautilus
orLANGUAGE=zh_CN flatpak run org.gnome.NautilusDevel
- Select a plain text file, open the properties dialog
Current behavior
It shows "纯[FFFD][FFFD]文本文档" or "纯��文本文档" instead of "纯文本文档"
Expected behavior
Neither [FFFD] nor � in the label
Additional information
<object class="GtkLabel" id="type_value_label">
<property name="ellipsize">end</property>
<property name="max-width-chars">24</property>
<property name="selectable">True</property>
<property name="visible">False</property>
<attributes>
<attribute name="text-transform"
value="PANGO_TEXT_TRANSFORM_UPPERCASE"
start="0" end="1"/>
</attributes>
</object>
The pango attribute PANGO_TEXT_TRANSFORM_UPPERCASE was added to the file type label (and also the file system label). But according to the document, the start and end index are in bytes, not characters.
So there will be display errors when dealing with multi-byte characters like Chinese.