File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
saxparser_chunk_parsing_inconsistent_state
saxparser_parse_double_free
saxparser_parse_stream_inconsistent_state Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 19
19
#include < libxml++/libxml++.h>
20
20
21
21
#include < cstdlib>
22
- #include < glibmm.h>
23
22
#include < sstream>
24
23
#include < stdexcept>
25
24
@@ -38,7 +37,9 @@ class MySaxParser : public xmlpp::SaxParser
38
37
39
38
int main ()
40
39
{
41
- Glib::init ();
40
+ // Set the global C and C++ locale to the user-configured locale,
41
+ // so we can use std::cout with UTF-8, via Glib::ustring, without exceptions.
42
+ std::locale::global (std::locale (" " ));
42
43
43
44
{
44
45
MySaxParser parser;
Original file line number Diff line number Diff line change 19
19
#include < libxml++/libxml++.h>
20
20
21
21
#include < cstdlib>
22
- #include < glibmm.h>
23
22
#include < stdexcept>
24
23
25
24
class OnCdataBlockTestParser : public xmlpp ::SaxParser
@@ -340,7 +339,9 @@ void test_on_start_element()
340
339
341
340
int main ()
342
341
{
343
- Glib::init ();
342
+ // Set the global C and C++ locale to the user-configured locale,
343
+ // so we can use std::cout with UTF-8, via Glib::ustring, without exceptions.
344
+ std::locale::global (std::locale (" " ));
344
345
345
346
test_on_cdata_block ();
346
347
test_on_characters ();
Original file line number Diff line number Diff line change 19
19
#include < libxml++/libxml++.h>
20
20
21
21
#include < cstdlib>
22
- #include < glibmm.h>
23
22
#include < sstream>
24
23
#include < stdexcept>
25
24
@@ -34,7 +33,9 @@ class MySaxParser : public xmlpp::SaxParser
34
33
35
34
int main ()
36
35
{
37
- Glib::init ();
36
+ // Set the global C and C++ locale to the user-configured locale,
37
+ // so we can use std::cout with UTF-8, via Glib::ustring, without exceptions.
38
+ std::locale::global (std::locale (" " ));
38
39
39
40
{
40
41
MySaxParser parser;
You can’t perform that action at this time.
0 commit comments