hexadecimal value 0x0B, is an invalid character when trying to generate Google base xml

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
Hi there,

I have been using v1.9 for a little while now and previously had generated an xml file, uploaded to google base which it accepted.  Recently i have been adding more items to my site and generating categories, have completed it and tried to generate an xml file to upload to base.  However I get this error message come up, price grabber and become seem to work as it sats generating successful but the froogle (google base one doesn't), any help guys?

Alam
12 years ago
I'm getting a similar error, is there a workaround for this?

Thanks,

Dave
12 years ago
I have the same problem and it seems that no one have this. It is somehere in the product name or description, I unpublished the product where the froogle file chrash and I regenerated the XML, It greated a bigger file but crash again on a different product. Didn't find yet the problem onto these 2 products.

If anyone have an idea it will be very appreciated

my error message is '', hexadecimal value 0x1A, is an invalid character.

Yves
12 years ago
it seems to be an invalide caracter form a cut and paste from Word .
From what I gather this frequently happens when someone copies in text from Microsoft Word.

it should have a filter when creating the XML like:

/// <summary>
        /// This removes characters that are invalid for xml encoding
        /// </summary>
        /// <param name="text">Text to be encoded.</param>
        /// <returns>Text with invalid xml characters removed.</returns>
        public static string CleanInvalidXmlChars(string text)
        {
            // From xml spec valid chars:
            // #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]    
            // any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
            string re = @"[^\x09\x0A\x0D\x20-\xD7FF\xE000-\xFFFD\x10000-x10FFFF]";
            return Regex.Replace(text, re, "");
        }

But where to put it it the plugin ?
Yves
11 years ago
Had a similar problem. Found the problem(s) using this SQL string below:

SELECT     Id, Name, ShortDescription, FullDescription, AdminComment, ProductTemplateId, ShowOnHomePage, MetaKeywords, MetaDescription, MetaTitle,
                      SeName, AllowCustomerReviews, ApprovedRatingSum, NotApprovedRatingSum, ApprovedTotalReviews, NotApprovedTotalReviews, Published,
                      Deleted, CreatedOnUtc, UpdatedOnUtc
FROM         Product
WHERE     (FullDescription LIKE '%' + CHAR(1) + '%')

You can change the CHAR(*) to whatever string error your getting and/or any other field name if its coming from somewhere else.

I used this table as a reference.. http://web.cs.mun.ca/~michael/c/ascii-table.html .... So for the orginal posters case you'd change it to CHAR(11)

Hope this helps someone else.
11 years ago
Great Thanks  a lot i'll give a try

have a nice one

Yves
www.usnautic.com
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.