Closed GoogleCodeExporter closed 9 years ago
Original comment by martin.o...@gmail.com
on 28 Oct 2006 at 12:26
Original comment by martin.o...@gmail.com
on 24 Dec 2006 at 9:05
Scandinavian characters (åäö) are also encoded incorrectly.
Original comment by martin.o...@gmail.com
on 24 Dec 2006 at 9:12
I attempted to fix the bug. I am able to send a message to GC containing (c)
(r) and
TM characters and they display properly, but the new-order-notification message
is
corrupted and all that is returned for any high level ascii characters(>127) is
?.
It would appear that GC is not processing the Item Name and Description is not
being
handled as UTF-8, or Google is not able to handle Numeric Character References
(NCRs).
Original comment by joseph.f...@gmail.com
on 3 Jan 2007 at 3:03
I performed a separate test to ensure there is a bug in Google Checkout related
to
how the Item name and Description are processed and returned.
I used a product with the name of:
Black Walnut Burl < © ® ™ >
and a description of:
Black Walnut Burl Wine Stopper < © ® ™ >
Both displayed correctly, calling either version of the EscapeXmlChars function
as
seen below.
The results that were returned in the new order confirmation were as follows.
Name: Black Walnut Burl &lt; ? ? ? &gt;
Description: Black Walnut Burl Wine Stopper &lt; ? ? ? &gt;
It appears that any high level ascii character is not being handled correctly.
Any
Numeric Character References
(NCRs) are being replaced with a ?.
Usually this happens when a stream is read as ascii when it should be read as
utf-8.
I have to assume this is done for security reasons.
Are we too assume that any non us English character will not be properly
handled by
Google checkout?
If I do not perform the conversion for the (c) or (r) symbols, I receive a Cart
Signature Error from GC.
If you would like any additional code, please contact me.
Joe Feser
Sample changes to EncoderHelper.EscapeXmlChars
public static string EscapeXmlChars(string In) {
string RetVal = In;
RetVal = RetVal.Replace("&", "&");
RetVal = RetVal.Replace("<", "<");
RetVal = RetVal.Replace(">", ">");
RetVal = RetVal.Replace("©", "©");
RetVal = RetVal.Replace("®", "®");
RetVal = RetVal.Replace("™", "™");
return RetVal;
}
public static string EscapeXmlChars(string In) {
string RetVal = In;
RetVal = RetVal.Replace("&", "&");
RetVal = RetVal.Replace("<", "<");
RetVal = RetVal.Replace(">", ">");
RetVal = RetVal.Replace("©", "©");
RetVal = RetVal.Replace("®", "®");
RetVal = RetVal.Replace("™", "™");
return RetVal;
}
Original comment by joseph.f...@gmail.com
on 4 Jan 2007 at 12:21
Fixed in version 31 of the code. The Dev Guide said that the content-type
header of
requests sent to Google should say "application/pdf", but it should say
"application/pdf; charset=UTF-8" instead.
Original comment by martin.o...@gmail.com
on 20 Jan 2007 at 10:30
Silly me. My Jan 20 comment on this bug should have read:
Fixed in version 31 of the code. The Dev Guide said that the content-type
header of
requests sent to Google should say "application/xml", but it should say
"application/xml; charset=UTF-8" instead.
Forget the nonsense about "pdf" in yesterday's comment.
Original comment by martin.o...@gmail.com
on 21 Jan 2007 at 11:10
Original issue reported on code.google.com by
martin.o...@gmail.com
on 13 Sep 2006 at 3:51