Use accented characters with Quickbooks SDK

Using Quickbooks SDK QBFC 7.0. When I try to get a list of all clients in quick books, if any of the clients has an accented character in their name, for example, I get an exception:

An Exception occurred! Type:UTFDataFormatException, Message: invalid byte 2 (<) 
of a 3-byte sequence. SAXParseException: error ar line 1, column 23 in XML data.

Several Intuit forums have stated that I need to change the XML to UTF-8 (that’s all they say, they don’t give a real solution), QBFC explicitly uses XML to send and receive data, but I cannot in any case redefine the encoding default.

The request is created using the following code. An exception occurs on DoRequests ()

IMsgSetRequest req = Session.GetLatestMsgSetRequest();
ICustomerQuery cq = req.AppendCustomerQueryRq();
IMsgSetResponse responseSet = Session.QBSM.DoRequests(req);
+3
source share
3 answers

QBFC , . QBFC. , , - qbXML, IncludeRetElementList , . , IncludeRetElementList, , .

ICustomerQuery custQuery = MsgRequest.AppendCustomerQueryRq();
custQuery.IncludeRetElementList.Add("ListID");
custQuery.IncludeRetElementList.Add("Name");
custQuery.IncludeRetElementList.Add("FirstName");
custQuery.IncludeRetElementList.Add("LastName");
custQuery.IncludeRetElementList.Add("ShipAddress");
+4

QBFC, qbXML XML. , QBFC, XML.

0

, , .

, ,

0

Source: https://habr.com/ru/post/1704504/


All Articles