claws.git
5 years agoUpdate root CA certificates
Colin Leroy [Thu, 24 Apr 2014 19:49:19 +0000 (21:49 +0200)]
Update root CA certificates

5 years agoAdd missing syms. Serious Win32 PITA
Colin Leroy [Thu, 24 Apr 2014 19:26:37 +0000 (21:26 +0200)]
Add missing syms. Serious Win32 PITA

5 years agoMore cleanup
Colin Leroy [Thu, 24 Apr 2014 19:04:20 +0000 (21:04 +0200)]
More cleanup

5 years agoRename i2d/d2i internal functions to clearer import/export.
Colin Leroy [Thu, 24 Apr 2014 18:45:45 +0000 (20:45 +0200)]
Rename i2d/d2i internal functions to clearer import/export.

5 years agoFix using ints for gnutls_x509_crt_fmt_t.
Colin Leroy [Thu, 24 Apr 2014 18:36:32 +0000 (20:36 +0200)]
Fix using ints for gnutls_x509_crt_fmt_t.

5 years agoRemove dead code from OpenSSL days
Colin Leroy [Thu, 24 Apr 2014 18:30:08 +0000 (20:30 +0200)]
Remove dead code from OpenSSL days

5 years agoFix claws exports for windows
Colin Leroy [Thu, 24 Apr 2014 18:21:45 +0000 (20:21 +0200)]
Fix claws exports for windows

5 years agoImplement certificate chain verification; fix leak; fix return code
Colin Leroy [Wed, 23 Apr 2014 09:01:42 +0000 (11:01 +0200)]
Implement certificate chain verification; fix leak; fix return code
for etpan_certificate_check().

5 years agoImplement certificate chain retrieval and passing. CAs are not loaded
Colin Leroy [Wed, 23 Apr 2014 07:42:55 +0000 (09:42 +0200)]
Implement certificate chain retrieval and passing. CAs are not loaded
yet.

5 years agoFactorize SSL things in etpan
Colin Leroy [Wed, 23 Apr 2014 07:14:33 +0000 (09:14 +0200)]
Factorize SSL things in etpan

5 years agoFix hardened builds and typo in configure.ac
Ricardo Mones [Tue, 22 Apr 2014 07:36:30 +0000 (09:36 +0200)]
Fix hardened builds and typo in configure.ac

Removes:
 • clamav_plugin.c:149:5: error: format not a string literal and
   no format arguments [-Werror=format-security]
 • ./configure: line 20189: dbl: command not found

5 years agoFix bug in string thanks to Mones
Michael Rasmussen [Tue, 22 Apr 2014 00:51:04 +0000 (02:51 +0200)]
Fix bug in string thanks to Mones

5 years agoOnly show error popup first time an error is found.
Michael Rasmussen [Mon, 21 Apr 2014 22:02:29 +0000 (00:02 +0200)]
Only show error popup first time an error is found.
An error popup is shown if an error is found under init
or first time an error found under scanning. Error popup
is suppressed until restarting claws or a scanning is
performed with success.

5 years agoFix bug #3105, "vCal plugin via https does not check SSL peer certificates or host"
Colin Leroy [Mon, 21 Apr 2014 12:46:29 +0000 (14:46 +0200)]
Fix bug #3105, "vCal plugin via https does not check SSL peer certificates or host"
Add a preference to disable SSL certificate verification.

5 years agoFix bug #3139, "Mainwindow unresponsive due to a busy loop"
Colin Leroy [Mon, 21 Apr 2014 11:49:46 +0000 (13:49 +0200)]
Fix bug #3139, "Mainwindow unresponsive due to a busy loop"
In case of unexpected return from gnutls_record_recv(), set errno to
a fatal error.

5 years agoFix bug #3117, "full-day event shown from 01:00 to 01:00 next day"
Colin Leroy [Mon, 21 Apr 2014 09:57:08 +0000 (11:57 +0200)]
Fix bug #3117, "full-day event shown from 01:00 to 01:00 next day"

5 years agoFix recognition of quoted parameter values, which are legal.
Colin Leroy [Mon, 21 Apr 2014 09:41:35 +0000 (11:41 +0200)]
Fix recognition of quoted parameter values, which are legal.

5 years agoFix bug #313, "Crash on reccurent events with no DTSTART"
Colin Leroy [Mon, 21 Apr 2014 09:02:45 +0000 (11:02 +0200)]
Fix bug #313, "Crash on reccurent events with no DTSTART"

5 years agoFix bug #3116, "invalid DTSTART in ics subscription makes claws crash"
Colin Leroy [Mon, 21 Apr 2014 08:56:54 +0000 (10:56 +0200)]
Fix bug #3116, "invalid DTSTART in ics subscription makes claws crash"

5 years agoFix bug #3150, "etpan_certificate_check() leaks memory"
Colin Leroy [Mon, 21 Apr 2014 08:01:39 +0000 (10:01 +0200)]
Fix bug #3150, "etpan_certificate_check() leaks memory"

5 years agoFix bug #3148, "Logic error in claws_get_socket_name()"
Colin Leroy [Mon, 21 Apr 2014 08:00:55 +0000 (10:00 +0200)]
Fix bug #3148, "Logic error in claws_get_socket_name()"

5 years agoFix bug #3147, "verify_folderlist_xml() leaks memory"
Colin Leroy [Mon, 21 Apr 2014 08:00:25 +0000 (10:00 +0200)]
Fix bug #3147, "verify_folderlist_xml() leaks memory"

5 years agoFix bug #3146, "Memory corruption when deleting a message from folder"
Colin Leroy [Mon, 21 Apr 2014 07:59:11 +0000 (09:59 +0200)]
Fix bug #3146, "Memory corruption when deleting a message from folder"
Reference msginfo before passing to the mark_as_read_timeout deferred
callback.

5 years agoFix bug #3145, "Memory corruption in imap_disconnect_all"
Colin Leroy [Mon, 21 Apr 2014 07:57:52 +0000 (09:57 +0200)]
Fix bug #3145, "Memory corruption in imap_disconnect_all"

5 years agoFix build bug.
Michael Rasmussen [Thu, 17 Apr 2014 14:15:07 +0000 (16:15 +0200)]
Fix build bug.
addrharvest.c:61: error: redefinition of typedef ‘HeaderEntry’
proctypes.h:58: note: previous declaration of ‘HeaderEntry’ was here

5 years agoDon't disable rssyl when checking libravatar
Ricardo Mones [Wed, 16 Apr 2014 18:18:52 +0000 (20:18 +0200)]
Don't disable rssyl when checking libravatar

5 years agoFix bug #3138 “pgpinline crashes on signature check if gppme fails to init”
Ricardo Mones [Sat, 12 Apr 2014 12:14:09 +0000 (14:14 +0200)]
Fix bug #3138 “pgpinline crashes on signature check if gppme fails to init”

5 years agoFix bug #3094 “OK or Yes to create new directory?”
Ricardo Mones [Sat, 12 Apr 2014 11:25:18 +0000 (13:25 +0200)]
Fix bug #3094 “OK or Yes to create new directory?”

6 years agoProbably fix bug #3050, "Claws mail closes when one attempts to delete a tag"
Colin Leroy [Tue, 8 Apr 2014 14:42:25 +0000 (16:42 +0200)]
Probably fix bug #3050, "Claws mail closes when one attempts to delete a tag"

6 years agoFix bug #3055, "Claws segfaults when cancelling a sticky search
Colin Leroy [Tue, 8 Apr 2014 14:13:04 +0000 (16:13 +0200)]
Fix bug #3055, "Claws segfaults when cancelling a sticky search
after changing folder"

6 years agoFix bug #3123, "Clean up git". Patch by Christian Hesse.
Colin Leroy [Tue, 8 Apr 2014 13:34:51 +0000 (15:34 +0200)]
Fix bug #3123, "Clean up git". Patch by Christian Hesse.

6 years agoFix typo
Ricardo Mones [Sun, 6 Apr 2014 00:24:39 +0000 (02:24 +0200)]
Fix typo

6 years agoUpdate plugins section of manual
Ricardo Mones [Sat, 5 Apr 2014 17:57:31 +0000 (19:57 +0200)]
Update plugins section of manual

• Merge extra plugins section, since they're all provided now.
• Synchronize list of plugins with website list.
• Add new “Obsolete plugins” section for the ones we're not
  shipping anymore for a variety of reasons.

6 years agoUpdate source code references to add git and re-wrap
Ricardo Mones [Sat, 5 Apr 2014 16:41:05 +0000 (18:41 +0200)]
Update source code references to add git and re-wrap

6 years agoFix bug #3126 “libravatar: do not collect empty files”
Christian Hesse [Wed, 26 Mar 2014 21:27:53 +0000 (22:27 +0100)]
Fix bug #3126 “libravatar: do not collect empty files”

Signed-off-by: Ricardo Mones <ricardo@mones.org>
6 years agowhen using Redirect, use the redirecting account's address in the SMTP MAIL FROM
Paul [Thu, 27 Mar 2014 16:16:32 +0000 (16:16 +0000)]
when using Redirect, use the redirecting account's address in the SMTP MAIL FROM

6 years agoFix bug #3120, "Error - file is empty" when redirecting a mail with
Colin Leroy [Tue, 25 Mar 2014 08:04:33 +0000 (09:04 +0100)]
Fix bug #3120, "Error - file is empty" when redirecting a mail with
an empty part: ask for confirmation when attaching an empty file,
apart in batch mode where no confirmation is asked.

6 years agoadd --from-code=UTF-8 to Makevars
Paul [Fri, 21 Mar 2014 06:33:10 +0000 (06:33 +0000)]
add --from-code=UTF-8 to Makevars

6 years agoFix default custom URL: needs 3 redirects
Ricardo Mones [Fri, 21 Mar 2014 00:36:06 +0000 (01:36 +0100)]
Fix default custom URL: needs 3 redirects

6 years agodon't reply to self when doing reply to all
Paul [Thu, 20 Mar 2014 08:46:38 +0000 (08:46 +0000)]
don't reply to self when doing reply to all

6 years agoSimplify and remove some obsolete entries
Ricardo Mones [Wed, 19 Mar 2014 21:28:29 +0000 (22:28 +0100)]
Simplify and remove some obsolete entries

6 years ago3 months into 2014, about time copyright was updated
Paul [Tue, 18 Mar 2014 10:00:45 +0000 (10:00 +0000)]
3 months into 2014, about time copyright was updated

6 years agofix implicit declaration warning
Paul [Tue, 18 Mar 2014 10:00:00 +0000 (10:00 +0000)]
fix implicit declaration warning

6 years agoreplace non ASCII-characters
Christian Hesse [Mon, 17 Mar 2014 19:13:56 +0000 (20:13 +0100)]
replace non ASCII-characters

Signed-off-by: Paul <paul@claws-mail.org>
6 years agotranslate libravatar plugin
Paul [Mon, 17 Mar 2014 17:53:00 +0000 (17:53 +0000)]
translate libravatar plugin

6 years agotidy up and get the string translated
Paul [Mon, 17 Mar 2014 17:48:26 +0000 (17:48 +0000)]
tidy up and get the string translated

6 years agofix build error: "#error GPGME was compiled with _FILE_OFFSET_BITS = 64"
Paul [Mon, 17 Mar 2014 16:58:51 +0000 (16:58 +0000)]
fix build error: "#error GPGME was compiled with _FILE_OFFSET_BITS = 64"

6 years agoFix crash due to wrong use of the gpointer source (which is a
Colin Leroy [Mon, 17 Mar 2014 13:59:54 +0000 (14:59 +0100)]
Fix crash due to wrong use of the gpointer source (which is a
pointer-to-pointer to GList), replace exit() with return.

6 years agoAdd the GPG keyring as possible source for address autocompletion.
Colin Leroy [Mon, 17 Mar 2014 13:56:15 +0000 (14:56 +0100)]
Add the GPG keyring as possible source for address autocompletion.
Patch by Christian Hesse, fixes bug #2868.

6 years agoA better README for libravatar plugin
Ricardo Mones [Sat, 15 Mar 2014 15:05:05 +0000 (16:05 +0100)]
A better README for libravatar plugin

 • Structure it more clearly (I hope)
 • Add a section about network issues and possible workarounds
 • Talk about plugin hidden property (yes, they're everywhere)

6 years agoEven more crazy idea added
Ricardo Mones [Sat, 15 Mar 2014 15:02:49 +0000 (16:02 +0100)]
Even more crazy idea added

6 years agoImprove plugin description a bit
Ricardo Mones [Sat, 15 Mar 2014 15:00:07 +0000 (16:00 +0100)]
Improve plugin description a bit

6 years agoFix bug #3109 “libravatar: make mail address lower case before hashing MD5”
Christian Hesse [Thu, 13 Mar 2014 14:03:39 +0000 (15:03 +0100)]
Fix bug #3109 “libravatar: make mail address lower case before hashing MD5”

Thanks again Christian Hesse for the patch!

6 years agoFix bug #3108 “link libravatar plugin against libcurl”.
Christian Hesse [Thu, 13 Mar 2014 10:19:18 +0000 (11:19 +0100)]
Fix bug #3108 “link libravatar plugin against libcurl”.

Thanks Christian Hesse for the patch.

6 years agoAdded Christoph Ruegge to AUTHORS file, for bug #3100.
Andrej Kacian [Wed, 12 Mar 2014 13:20:33 +0000 (14:20 +0100)]
Added Christoph Ruegge to  AUTHORS file, for bug #3100.

6 years agoGIT-Ignore the results of libravatar's compilation
Colin Leroy [Wed, 12 Mar 2014 13:09:48 +0000 (14:09 +0100)]
GIT-Ignore the results of libravatar's compilation

6 years agoFix bug #3107, " Height of row in message list does not
Colin Leroy [Wed, 12 Mar 2014 13:06:06 +0000 (14:06 +0100)]
Fix bug #3107, " Height of row in message list does not
reflect font size - three columns, small screen layout"
Patch by Peter Sarvas.

6 years agofix overlapping labels and boxes when user has large GTK font
Paul [Wed, 12 Mar 2014 11:48:41 +0000 (11:48 +0000)]
fix overlapping labels and boxes when user has large GTK font

6 years agoFix a couple of bugs
Ricardo Mones [Tue, 11 Mar 2014 20:34:26 +0000 (21:34 +0100)]
Fix a couple of bugs

 • Incorrect initialization of radiobuttons on prefs (remember
   not to use the same variable for two purposes...)
 • Empty missing cache when changing to generated-avatar missing
   icon modes, otherwise they're still served as missing

6 years agoNew libravatar plugin
Ricardo Mones [Mon, 10 Mar 2014 23:33:43 +0000 (00:33 +0100)]
New libravatar plugin

6 years agoWhen autoselecting account for a new message, handle quoted recipient names better...
Andrej Kacian [Fri, 7 Mar 2014 22:24:39 +0000 (23:24 +0100)]
When autoselecting account for a new message, handle quoted recipient names better. Patch by Christoph Ruegge, bug #3100.

6 years agoShow header pane only when enabled
Ricardo Mones [Sun, 2 Mar 2014 19:36:12 +0000 (20:36 +0100)]
Show header pane only when enabled

6 years agoUse new internal plugin for rendering avatars
Ricardo Mones [Sun, 16 Feb 2014 18:21:54 +0000 (19:21 +0100)]
Use new internal plugin for rendering avatars

Updates and simplifies rendering logic in header pane,
message view and text view and when adding pictures to
address book.

6 years agoNew hooklist for rendering avatars and some utils
Ricardo Mones [Sat, 15 Feb 2014 19:40:43 +0000 (20:40 +0100)]
New hooklist for rendering avatars and some utils

 • Create and destroy hooklist parameter structs
 • Initialization function to install default handler

6 years agoNew hooklist to collect avatar data from headers
Ricardo Mones [Wed, 12 Feb 2014 22:56:32 +0000 (23:56 +0100)]
New hooklist to collect avatar data from headers

Also:
 • Refactorize X-Face/Face capture as an internal plugin.
 • Add hidden preference ‘enable_avatars’ to control the internal
   capture/render process, and which allows disabling it by external
   plugins for example.

6 years agoadd dist-z to AUTOMAKE_OPTIONS
Paul [Wed, 19 Feb 2014 15:57:40 +0000 (15:57 +0000)]
add dist-z to AUTOMAKE_OPTIONS

6 years agoRemove some X-Face cruft and check after realloc
Ricardo Mones [Wed, 19 Feb 2014 00:36:37 +0000 (01:36 +0100)]
Remove some X-Face cruft and check after realloc

6 years agoindicate when there are messages in Drafts
Paul [Mon, 17 Feb 2014 13:25:29 +0000 (13:25 +0000)]
indicate when there are messages in Drafts

6 years agoRemoved unused "block_cursor" preference from prefs_common.
Andrej Kacian [Sun, 16 Feb 2014 12:37:19 +0000 (13:37 +0100)]
Removed unused "block_cursor" preference from prefs_common.

6 years agoRemove unneeded arguments of xface_get_from_header
Ricardo Mones [Wed, 12 Feb 2014 22:22:37 +0000 (23:22 +0100)]
Remove unneeded arguments of xface_get_from_header

6 years agoSupport any number of avatars per message
Ricardo Mones [Tue, 11 Feb 2014 00:17:29 +0000 (01:17 +0100)]
Support any number of avatars per message

Adapt xface/face handling to the new structure

6 years agoNew slist_copy_deep utility
Ricardo Mones [Tue, 11 Feb 2014 00:14:45 +0000 (01:14 +0100)]
New slist_copy_deep utility

And refactoring to use it where currently needed.
Implementation uses glib's version if possible (glib > 2.34).

6 years agocombine xmailer/xnewsreader header options into one, using generic term "user agent"
Paul [Wed, 5 Feb 2014 09:09:20 +0000 (09:09 +0000)]
combine xmailer/xnewsreader header options into one, using generic term "user agent"

6 years agoadd hidden prefs to choose old or new style addr and folder matching
Paul [Wed, 5 Feb 2014 08:28:28 +0000 (08:28 +0000)]
add hidden prefs to choose old or new style addr and folder matching

6 years agoimplement RFE bug 3053, 'Can't add "replace signature" to the toolbar'
Paul [Mon, 3 Feb 2014 14:03:17 +0000 (14:03 +0000)]
implement RFE bug 3053, 'Can't add "replace signature" to the toolbar'

6 years agoadd option 'Generate X-Newsreader header' for NNTP accounts and complete the 'Generat...
Paul [Mon, 3 Feb 2014 13:16:00 +0000 (13:16 +0000)]
add option 'Generate X-Newsreader header' for NNTP accounts and complete the 'Generate X-Mailer header' option

6 years agoLIBOVERLAY_SCROLLBAR=0, thanks Ticho!!
Paul [Mon, 3 Feb 2014 11:48:22 +0000 (11:48 +0000)]
LIBOVERLAY_SCROLLBAR=0, thanks Ticho!!

6 years agoFix memory leak
Ricardo Mones [Thu, 30 Jan 2014 09:34:19 +0000 (10:34 +0100)]
Fix memory leak

6 years agoadd Esperanto translation. submitted by Sian Mountbatten
Paul [Wed, 29 Jan 2014 13:37:46 +0000 (13:37 +0000)]
add Esperanto translation. submitted by Sian Mountbatten

6 years agoPython plugin: Also check for _PyGtk_API being a PyCapsule
Holger Berndt [Sun, 26 Jan 2014 12:14:21 +0000 (13:14 +0100)]
Python plugin: Also check for _PyGtk_API being a PyCapsule

Seems like Arch Linux patched pygtk to wrap into a PyCapsule instead
of a PyCObject.

Thanks to Drew Ferguson for reporting.

6 years agoFix bug #3964 "headers in wrong order -- file src/common/ssl.c"
Ricardo Mones [Tue, 21 Jan 2014 11:46:23 +0000 (12:46 +0100)]
Fix bug #3964 "headers in wrong order -- file src/common/ssl.c"

Also cleans "ssl.c:36:1: warning: 'gcry_threads_pthread' defined but not used"

6 years agoUpdate manpage
Ricardo Mones [Mon, 13 Jan 2014 20:19:35 +0000 (21:19 +0100)]
Update manpage

• Add missing USER environment variable and sort all variables
  alphabetically while at it
• Update team list to match AUTHORS file and compact list of past
  team members
• Other cosmetic changes to improve readability

6 years agoFix bug #2875, "SMTP session disconnects before recieving multi-line
Colin Leroy [Sat, 28 Dec 2013 18:16:37 +0000 (19:16 +0100)]
Fix bug #2875, "SMTP session disconnects before recieving multi-line
error message".

6 years agoFix bug #2991, "POP3 sessions duplicated" on race conditions. Patch by
Colin Leroy [Sat, 28 Dec 2013 17:31:22 +0000 (18:31 +0100)]
Fix bug #2991, "POP3 sessions duplicated" on race conditions. Patch by
Paul Rolland.

6 years agoFix bug #3020, "Use theme doesn't change some icons until restart"
Colin Leroy [Sat, 28 Dec 2013 17:15:31 +0000 (18:15 +0100)]
Fix bug #3020, "Use theme doesn't change some icons until restart"

6 years agoAdd Palmer Dabbelt to Authors
Colin Leroy [Sat, 28 Dec 2013 17:10:26 +0000 (18:10 +0100)]
Add Palmer Dabbelt to Authors

6 years agoFix bug #3040, "Handle revoked GPG private keys". Patch by Palmer Dabbelt.
Colin Leroy [Sat, 28 Dec 2013 17:08:38 +0000 (18:08 +0100)]
Fix bug #3040, "Handle revoked GPG private keys". Patch by Palmer Dabbelt.

6 years agoFix bug #3038, "Select A Folder incorrectly matches on number
Colin Leroy [Sat, 28 Dec 2013 16:40:12 +0000 (17:40 +0100)]
Fix bug #3038, "Select A Folder incorrectly matches on number
in parentheses". Match on FolderItem's name instead of displayed
string.

6 years agoAdd preference to allow disabling automatic drafting of encrypted
Colin Leroy [Fri, 20 Dec 2013 10:53:18 +0000 (11:53 +0100)]
Add preference to allow disabling automatic drafting of encrypted
messages.

6 years agoFix parsing universal time zone in mailmbox
Ricardo Mones [Mon, 16 Dec 2013 01:21:59 +0000 (02:21 +0100)]
Fix parsing universal time zone in mailmbox

Detected thanks to the ‘-Wlogical-op’ gcc flag.

6 years agofix typo
Paul [Sat, 14 Dec 2013 11:20:24 +0000 (11:20 +0000)]
fix typo

6 years ago3.9.3 unleashed 3.9.3
Paul [Sat, 14 Dec 2013 10:12:55 +0000 (10:12 +0000)]
3.9.3 unleashed

6 years agoupdate translations
Paul [Sat, 14 Dec 2013 08:37:32 +0000 (08:37 +0000)]
update translations

cs: David Vachulka
de: Thomas Bellmann
es: Ricarddo Mones
fr: Colin Leroy
he: Genghis Khan
nl: Marcel Pol
pt_BR: Frederico Goncalves Guimaraes
sk: Slavko
sv: Andreas Rönnquist

6 years agoRevert last commit
Pawel Pekala [Fri, 13 Dec 2013 20:54:28 +0000 (21:54 +0100)]
Revert last commit

6 years agoFix python check for systems with dlopen(3) in libc (BSD family)
Pawel Pekala [Fri, 13 Dec 2013 19:58:41 +0000 (20:58 +0100)]
Fix python check for systems with dlopen(3) in libc (BSD family)

6 years agoIn compose window, allow address completion to match any part of address, not just...
Andrej Kacian [Thu, 12 Dec 2013 17:18:23 +0000 (18:18 +0100)]
In compose window, allow address completion to match any part of address, not just beginning.

6 years agoIn folder select dialog, allow type-search to match any part of folder names, not...
Andrej Kacian [Thu, 12 Dec 2013 11:17:59 +0000 (12:17 +0100)]
In folder select dialog, allow type-search to match any part of folder names, not just beginning.

6 years agoFix assertion (port != NULL) in password_get() for
Colin Leroy [Sun, 8 Dec 2013 09:32:48 +0000 (10:32 +0100)]
Fix assertion (port != NULL) in password_get() for
POP3 sessions, where the password is retrieved prior
to the session being connected.

6 years agoBetter fix for bug #3009; conv_filename_to_utf8() converts strings
Colin Leroy [Thu, 5 Dec 2013 11:05:24 +0000 (12:05 +0100)]
Better fix for bug #3009; conv_filename_to_utf8() converts strings
in local filename encoding to UTF-8 even if local filename encoding
is UTF-8, leading to double UTF-8 encoding.

6 years agoFix bug #3009 ‘"Rebuild folder tree" causes SIGSEGV if a directory name isn't valid...
Ricardo Mones [Thu, 5 Dec 2013 10:00:29 +0000 (11:00 +0100)]
Fix bug #3009 ‘"Rebuild folder tree" causes SIGSEGV if a directory name isn't valid utf-8’

Based on initial patch submitted by Fabian Keil <fk@fabiankeil.de>