开发者

How Do I Properly Format Characters From eBay and Amazon Catalog?

I am using the Amazon and eBay API via PHP5 and Curl to get product listings for a client. When I ask the API to give me a description or a category for a product, I'm sometimes getting something that looks like this:

Estée Lauder

When I go look at the XML download from the API, it shows this entry inside:

<categoryName>Estée Lauder</categoryName>

The product in particular was this one.... So as not to give away the affiliate ID, just do t开发者_开发问答his -- query http://ebay.com/ on "ESTEE LAUDER HIGH GLOSS ULTRA BRILLIANCE GLOSS-'Berry'". Then click the link that is named this.

How can I trap for this and properly display this? I am using PHP5.


Use the mb_content_encoding function and convert the string utf-8. You can read more from this http://hu.php.net/manual/en/book.mbstring.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜