nix-community / dconf2nix

:feet: Convert dconf files (e.g. GNOME Shell) to Nix, as expected by Home Manager [maintainer=@jtojnar]
Apache License 2.0
244 stars 5 forks source link

Add full Unicode support #89

Closed jtojnar closed 7 months ago

jtojnar commented 7 months ago

dconf dump uses g_variant_print, which prints most Unicode characters verbatim. dconf2nix would read those and then use show to serialize the parsed strings. But show encodes Unicode characters as a decimal number preceded by a backslash, (e.g. \129315), which means nothing to Nix.

Let’s encode strings as UTF-8 when dumping them to Nix.

Also fix the test data from e2b5065718f4de55ce7afe4c8d385a123eaf3e1b, they were copied as reported by parserTraced but the actual data was mostly Unicode with few escape sequences.