On 06/06/2019 12:16, Christian Brabandt wrote:
> 
> On Do, 06 Jun 2019, Mike Williams wrote:
> 
>> Hi
>>
>> On 05/06/2019 20:25, Bram Moolenaar wrote:
>>>
>>> Patch 8.1.1468
>>> Problem:    The generated desktop files may be invalid.
>>> Solution:   Check validity with desktop-file-validate. (Christian Brabandt,
>>>               Will Thompson, closes #4480)
>>> Files:	    src/po/Makefile
>>>
>>
>> A clean build and install is now reporting the following warnings and
>> errors:
>>
>> msgfmt --desktop -d . --template 
gvim.desktop.in -o tmp_gvim.desktop
>> rm -f LINGUAS
>> if command -v desktop-file-validate; then desktop-file-validate
>> tmp_gvim.desktop; fi
>> /usr/bin/desktop-file-validate
> 
>> tmp_gvim.desktop: warning: file contains lines that are not UTF-8
>> encoded. There is no guarantee the validator will correctly work.
> 
> I have no clue where that comes from.
This may be related to the later UTF-8 warning.
Confirmed.
>> [Invalid UTF-8] tmp_gvim.desktop: error: value
>> "\xe0\xac\xaa\xe0\xac\xbe\xe0\xac\xa0\xe0\xad\x8d\xe0\xac\xaf
>> \xe0\xac\xab\xe0\xac\xbe\xe0\xac\x87\xe0\xac\xb2\xe0\xac\x97\xe0\xad\x81\xe0\xac\xa1\xe0\xac\xbc\xe0\xac\xbf\xe0\xac\x95\xe0\xad\x81
>> \xe0\xac\xb8\xe0\xac\xae\xe0\xad\x8d\xe0\xac\xaa\xe0\xac\xbe\xe0\xac\xa6\xe0\xac\xa8
>> \xe0\xac\x95\xe0\xac\xb0\xe0\xac\xa8\xe0\xad\x8d\xe0\xac\xa4\xe0\xad"
>> for locale string key "Comment[or]" in group "Desktop Entry" contains
>> invalid UTF-8 characters, locale string values should be encoded in UTF-8
> 
> I don't see that. I suspect either msgfmt cannot correctly handle the
> template (
gvim.desktop.in) file or desktop-file-validate does
> incorrectly detect it as non UTF-8
> 
> BTW, is your locale set correctly?
 I believe so.  All settings are en_GB.UTF-8
> For the records, in my debian dev box, I am using:
> gettext:
>    Installed: 0.19.8.1-9
>    Candidate: 0.19.8.1-9
>    Version table:
>   *** 0.19.8.1-9 500
>          500 
http://ftp.de.debian.org/debian buster/main amd64 Packages
>          100 /var/lib/dpkg/status
> 0 140901 chrisbra@debian ~/code/vim-src/src/po (git)-[desktop-file-utils]- % apt-cache policy desktop-file-utils
> desktop-file-utils:
>    Installed: 0.23-4
>    Candidate: 0.23-4
>    Version table:
>   *** 0.23-4 500
>          500 
http://ftp.de.debian.org/debian buster/main amd64 Packages
>          100 /var/lib/dpkg/status
 ~/repos/vim $ apt list gettext desktop-file-utils
Listing... Done
desktop-file-utils/xenial-updates,now 0.22-1ubuntu5.2 i386 [installed]
gettext/xenial-updates,xenial-security,now 0.19.7-2ubuntu3.1 i386 
[installed]
So slightly behind your versions.
>> This is on Ubuntu 16.04  Is this a problem with the VIM po source or
>> lack or installed tooling?
> 
> I am not sure yet. What does the raw generated utf-8 file tmp_gvim.desktop look like?
It looks like the last byte of the last character has been dropped in 
processing.  The .in file has the UTF-8 sequence 0xe0 0xad 0x81 0x0a for 
the last character and the newline, but the tmp file has  0xe0 0xad 0x0a 
which is an invalid UTF-8 sequence.  Removing the line from both the .in 
files allows make to run to completion with no errors.
This looks like a bug in msgfmt which should not be emitting invalid 
UTF-8 sequences.  In the meantime this will break all builds on U16.04. :(
TTFN
Mike
-- 
If you're not making waves, you're not rowing the boat.