[Bug 30992] msxml3 incorrectly parses Cyrillic text with spaces (needed for Civilization IV)

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Jun 26 04:00:44 CDT 2012


http://bugs.winehq.org/show_bug.cgi?id=30992

Nikolay Sivov <bunglehead at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1

--- Comment #6 from Nikolay Sivov <bunglehead at gmail.com> 2012-06-26 04:00:44 CDT ---
I think I know why it works this way, haven't found example file data in log
though. If you comment out this block:

---
    if (ctxt->node)
    {
        /* during domdoc_loadXML() the xmlDocPtr->_private data is not
available */
        if (!This->properties->preserving &&
            !is_preserving_whitespace(ctxt->node) &&
            strn_isspace(ch, len))
            return;
    }
---

from sax_characters() from msxml3/domdoc.c you will probably get proper results
(but be aware that it could stop working entirely cause tree will be different
after this change.

The problem is in a way libxml2 reports character references, they are reported
in separate sax callback, and when we do this space fixing mess there's we're
unaware of history of previous calls. It will work if we make sure next
callback is not for text data, practically this means that we should delay text
data processing until we get some other callback so we can process text node as
a whole and drop it if it's nothing but space chars (depending on that props
condition of course).

I'll keep looking at it, just no obviously correct and quick solution comes to
mind right now.

And confirming.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list