[2/2] msxml3/domdoc: Add support for VT_ARRAY|VT_UI1 in domdoc_load().

Adam Martinson amartinson at codeweavers.com
Tue May 3 09:43:09 CDT 2011


On 05/03/2011 01:45 AM, Nikolay Sivov wrote:
> On 5/3/2011 08:07, Adam Martinson wrote:
>>
>> Fixes bug 14864.
>> ---
>>  dlls/msxml3/domdoc.c |  255 
>> ++++++++++++++++++++++++++------------------------
>>  1 files changed, 134 insertions(+), 121 deletions(-)
>>
>> +    case VT_ARRAY|VT_UI1:
>> +        {
>> +            SAFEARRAY* psa;
>> +            BSTR bstr;
>> +            psa = V_ARRAY(&source);
>> +            bstr = bstr_from_xmlChar(psa->pvData);
>> +            hr = domdoc_loadXML(iface, bstr, isSuccessful);
>> +            SysFreeString(bstr);
>> +            return hr;
>> +        }
>> +        break;
> Is it really supposed to be utf8 array? Or this will work cause 
> one-byte chars match utf8?
>
> Also I don't like this method dependency, I think the proper way is to 
> call IXMLDOMDocument3_loadXML(iface...) here.
> Or another way to avoid call through vtable - introduce something 
> called domdoc_load_xml(This...) and use it in both places,
> but I think it's not worth it.

It was the Google Chrome installer, I'm not sure if it's supposed to be 
UTF8 or not, all of the characters it used were ASCII.  I'm assuming 
it's supposed to be UTF8 due to it being VT_UI8 instead of VT_I8, but I 
can't say for sure.  I remember another place where it would have been 
useful to be able to call domdoc_loadXML() with a UTF8 string to avoid 
converting to BSTR and back, I think in the schema stuff.  It would be 
nice to have an internal function to do that, then domdoc_loadXML() can 
just wrap it, but I think that can be a separate patch.




More information about the wine-devel mailing list