Bug 10093 - desktop-file-validate does not handle key "Encoding" correctly
Summary: desktop-file-validate does not handle key "Encoding" correctly
Status: RESOLVED FIXED
Alias: None
Product: desktop-file-utils
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: Vincent Untz
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-25 13:30 UTC by Andreas Hanke
Modified: 2007-03-18 04:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Andreas Hanke 2007-02-25 13:30:00 UTC
# cat << EOF > testcase.desktop
[Desktop Entry]
Type=Application
Name=Test Me
EOF

# desktop-file-validate testcase.desktop
testcase.desktop: error: required key "Encoding" not found

But:

"The Encoding key is deprecated. It was used to specify whether keys of type
localestring were encoded in UTF-8 or in the specified locale. Possible values
are UTF-8 and Legacy-Mixed."

http://standards.freedesktop.org/desktop-entry-spec/latest/apc.html
Comment 1 Andreas Hanke 2007-02-25 13:41:37 UTC
Mandriva uses this patch:

http://cvs.mandriva.com/cgi-bin/viewvc.cgi/SPECS/desktop-file-utils/desktop-file-utils-0.11-encoding.patch?view=markup

It's a very simple solution, but it doesn't warn about the fact that this key is actually deprecated.

IMHO it should give a deprecation warning if the "Encoding" key is present, and if none is present, validate the file as UTF-8.
Comment 2 Andreas Hanke 2007-03-17 09:16:09 UTC
A rewrite of the code in question has just been committed by yourself and it works for me.

Does it mean this report could be closed?
Comment 3 Vincent Untz 2007-03-18 04:52:06 UTC
Yes, we can close this bug, although the code still needs some work before being releasable.
Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.