gnumeric r17125 - trunk/plugins/html
- From: jhellan svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17125 - trunk/plugins/html
- Date: Fri, 6 Feb 2009 22:32:20 +0000 (UTC)
Author: jhellan
Date: Fri Feb 6 22:32:20 2009
New Revision: 17125
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17125&view=rev
Log:
* html_read.c (html_file_open): Detect unmarked UTF16LE more
robustly.
Modified:
trunk/plugins/html/ChangeLog
trunk/plugins/html/html_read.c
Modified: trunk/plugins/html/html_read.c
==============================================================================
--- trunk/plugins/html/html_read.c (original)
+++ trunk/plugins/html/html_read.c Fri Feb 6 22:32:20 2009
@@ -510,9 +510,11 @@
case XML_CHAR_ENCODING_NONE:
bomlen = 0;
/* Try to detect unmarked UTF16LE
- (Firefox drag data) */
- if (buf[0] >= 0x20 && buf[1] == 0 &&
- buf[2] >= 0x20 && buf[3] == 0)
+ (Firefox Windows clipboard, drag data all platforms) */
+ if ((buf[0] >= 0x20 || g_ascii_isspace(buf[0])) &&
+ buf[1] == 0 &&
+ (buf[2] >= 0x20 || g_ascii_isspace(buf[2])) &&
+ buf[3] == 0)
enc = XML_CHAR_ENCODING_UTF16LE;
break;
default:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]