For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

Error calling GetProductSearchResults with non-US characters in search string

  • Answer ID 153
  • Published 08/31/2004 01:37 PM
  • Updated 10/20/2013 06:41 AM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=153
Product
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

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter