From a085926636dd3087e5ff42749a2d3bccd05c43bc Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Mon, 17 Jan 2011 11:14:31 +0000 Subject: [PATCH] 2011-01-17 12:14 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/contrib/hbmxml/hbmxml.c * use hb_parstr_utf8() instead of hb_parc() in custom_save_cb() --- harbour/ChangeLog | 4 ++++ harbour/contrib/hbmxml/hbmxml.c | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index de3e0b5ce2..232decfcb4 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2011-01-17 12:14 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/contrib/hbmxml/hbmxml.c + * use hb_parstr_utf8() instead of hb_parc() in custom_save_cb() + 2011-01-16 23:29 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbmxml/tests/testmxml.prg ! Reverted 2011-01-17 00:05 UTC+0200 Petr Chornyj. diff --git a/harbour/contrib/hbmxml/hbmxml.c b/harbour/contrib/hbmxml/hbmxml.c index f063cd1b14..9f42164f08 100644 --- a/harbour/contrib/hbmxml/hbmxml.c +++ b/harbour/contrib/hbmxml/hbmxml.c @@ -1840,7 +1840,9 @@ static char * custom_save_cb( mxml_node_t * node ) if( pCallback && hb_vmRequestReenter() ) { - char * pszResult; + char * pszResult; + const char * pszText; + void * hText; hb_vmPushEvalSym(); hb_vmPush( pCallback ); @@ -1848,7 +1850,9 @@ static char * custom_save_cb( mxml_node_t * node ) hb_vmSend( 1 ); - pszResult = HB_ISCHAR( -1 ) ? strdup( hb_parc( -1 ) ) : NULL; + pszText = hb_parstr_utf8( -1, &hText, NULL ); + pszResult = pszText ? hb_strdup( pszText ) : NULL; + hb_strfree( hText ); hb_vmRequestRestore(); return pszResult;