Skip to main content
Published: August 31 2004, 1:37:00 PMUpdated: July 20 2022, 12:02:06 AM

A European user tried to search for a CD by artist with the search string "björk" (the "o" in this word has an umlaut and corresponds with decimal code 246). When they submitted their search, we tried to make a call to GetProductSearchResults with that search string wrapped in a CDATA tag. However, we got the Conversion buffer overflow error below from the .Net SDK object being called, presumably because that character falls outside the normal ASCII range.

Error Type: System.ArgumentException
Description: Conversion buffer overflow.
File: /en/inventory/product_search_results.aspx
Referrer: /en/inventory/product_search.aspx?atc=6101&cat1=279&cat2=0&itemuid=13736175
Stack Trace: System.ArgumentException: Conversion buffer overflow.
at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, UTF8Encoder encoder)
at System.Text.UTF8Encoding.GetBytes(String s, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex)
at eBay.SDK.API.ApiXmlPoster.PostXml(XmlDocument xml)
at eBay.SDK.API.ApiXmlPoster.PostXmlText(String reqXml)

When using the XML Poster class, please specify your encoding as <?xml version='1.0' encoding='utf-8'?> . This will eliminate the error.

How well did this answer your question?
Answers others found helpful