problem with "numeric" type in Desktop Entry Spec
Vincent Untz
vuntz at gnome.org
Wed Apr 18 14:56:07 PDT 2007
Hi,
Le mardi 17 avril 2007, à 12:45, Dan Winship a écrit :
> The description of the "numeric" data type in the Desktop Entry Spec is:
>
> a valid floating point number as recognized by the %f specifier for
> scanf.
>
> But this makes its representation locale-dependent (eg, "Version=1.0" in
> en_EN, "Version=1,0" in fr_FR). It needs to say:
>
> a valid floating point number as recognized by the %f specifier for
> scanf in the C locale.
Good catch.
> (Google codesearch doesn't turn up any desktop files that actually mess
> up because of this.)
>
> The description of the Version key also sort of implies that a
> conforming .desktop file will have either no Version key or
> "Version=1.0", but really, it could also have "Version=1",
> "Version=1.00000", or "Version=+01.0e0".
>
> (Google doesn't turn up any .desktop files that get that wrong either,
> but if a GNOME app used g_key_file_set_double() to set the Version key
> in a new .desktop file, it would end up with "Version=1".)
For the Version key, I proposed a patch to change the type to String,
since it's backwards-compatible with 0.9.x versions of the spec: 0.9.8
is not a float :-)
I don't think that what you're describing could be a problem for other
Numeric keys.
Thanks,
Vincent
--
Les gens heureux ne sont pas pressés.
More information about the xdg
mailing list