summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-27 00:25:16 -0800
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-11-27 00:25:16 -0800
commit93c3ab46494f35c390b40220519d83634e4e347f (patch)
tree68616e5f1c2a5175e4a27645761e891429364ed5
parent4b8da65be9f5adb340d7edf32362bdb24f20833b (diff)
parent10c9206de2ae4079ca1239ff44cee3fdb1deadf5 (diff)
Merge branch 'master' into compact
-rw-r--r--README.md4
-rw-r--r--docs/manual.html2
-rw-r--r--docs/manual.qbk1
-rw-r--r--docs/manual/changes.html4
-rw-r--r--src/pugixml.cpp4
-rw-r--r--tests/data/тест.xml1
-rw-r--r--tests/test_document.cpp10
7 files changed, 21 insertions, 5 deletions
diff --git a/README.md b/README.md
index 2d8263d..71eaede 100644
--- a/README.md
+++ b/README.md
@@ -12,8 +12,8 @@ pugixml is used by a lot of projects, both open-source and proprietary, for perf
Documentation for the current release of pugixml is available on-line as two separate documents:
-* [Quick-start guide](http://cdn.rawgit.com/zeux/pugixml/v1.4/docs/quickstart.html), that aims to provide enough information to start using the library;
-* [Complete reference manual](http://cdn.rawgit.com/zeux/pugixml/v1.4/docs/manual.html), that describes all features of the library in detail.
+* [Quick-start guide](http://cdn.rawgit.com/zeux/pugixml/v1.5/docs/quickstart.html), that aims to provide enough information to start using the library;
+* [Complete reference manual](http://cdn.rawgit.com/zeux/pugixml/v1.5/docs/manual.html), that describes all features of the library in detail.
You’re advised to start with the quick-start guide; however, many important library features are either not described in it at all or only mentioned briefly; if you require more information you should read the complete manual.
diff --git a/docs/manual.html b/docs/manual.html
index 64c1c90..0eb13b9 100644
--- a/docs/manual.html
+++ b/docs/manual.html
@@ -184,7 +184,7 @@ pugixml
</div>
</div></div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: November 18, 2014 at 17:25:31 GMT</small></p></td>
+<td align="left"><p><small>Last revised: November 26, 2014 at 02:23:21 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
diff --git a/docs/manual.qbk b/docs/manual.qbk
index b703948..20305cf 100644
--- a/docs/manual.qbk
+++ b/docs/manual.qbk
@@ -1922,6 +1922,7 @@ Major release, featuring a lot of performance improvements and some new features
* Bug fixes
# Adjusted comment output to avoid malformed documents if the comment value contains "--"
# Fix XPath sorting for documents that were constructed using append_buffer
+ # Fix load_file for wide-character paths with non-ASCII characters in MinGW with C++11 mode enabled
[h5 27.02.2014 - version 1.4]
diff --git a/docs/manual/changes.html b/docs/manual/changes.html
index 05891a7..a3495b2 100644
--- a/docs/manual/changes.html
+++ b/docs/manual/changes.html
@@ -126,6 +126,10 @@
<li class="listitem">
Fix XPath sorting for documents that were constructed using append_buffer
</li>
+<li class="listitem">
+ Fix load_file for wide-character paths with non-ASCII characters
+ in MinGW with C++11 mode enabled
+ </li>
</ol></div>
</li>
</ul></div>
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 16a012e..52ddf4c 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -4548,7 +4548,7 @@ PUGI__NS_BEGIN
_fseeki64(file, 0, SEEK_END);
length_type length = _ftelli64(file);
_fseeki64(file, 0, SEEK_SET);
- #elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) && !defined(__STRICT_ANSI__)
+ #elif defined(__MINGW32__) && !defined(__NO_MINGW_LFS) && !(defined(__STRICT_ANSI__) && __GNUC__ * 100 + __GNUC_MINOR__ <= 405)
// there are 64-bit versions of fseek/ftell, let's use them
typedef off64_t length_type;
@@ -4793,7 +4793,7 @@ PUGI__NS_BEGIN
}
#endif
-#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && !defined(__STRICT_ANSI__))
+#if defined(PUGI__MSVC_CRT_VERSION) || defined(__BORLANDC__) || (defined(__MINGW32__) && !(defined(__STRICT_ANSI__) && __GNUC__ * 100 + __GNUC_MINOR__ <= 405))
PUGI__FN FILE* open_file_wide(const wchar_t* path, const wchar_t* mode)
{
return _wfopen(path, mode);
diff --git a/tests/data/тест.xml b/tests/data/тест.xml
new file mode 100644
index 0000000..6187c16
--- /dev/null
+++ b/tests/data/тест.xml
@@ -0,0 +1 @@
+<node/> \ No newline at end of file
diff --git a/tests/test_document.cpp b/tests/test_document.cpp
index 4228602..f57465f 100644
--- a/tests/test_document.cpp
+++ b/tests/test_document.cpp
@@ -323,6 +323,16 @@ TEST(document_load_file_wide_ascii)
CHECK_NODE(doc, STR("<node />"));
}
+#if !defined(__DMC__) && !defined(__MWERKS__) && !(defined(__MINGW32__) && defined(__STRICT_ANSI__) && __GNUC__ * 100 + __GNUC_MINOR__ <= 405)
+TEST(document_load_file_wide_unicode)
+{
+ pugi::xml_document doc;
+
+ CHECK(doc.load_file(L"tests/data/\x0442\x0435\x0441\x0442.xml"));
+ CHECK_NODE(doc, STR("<node />"));
+}
+#endif
+
TEST(document_load_file_wide_out_of_memory)
{
test_runner::_memory_fail_threshold = 1;