开发者

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

开发者 https://www.devze.com 2022-12-31 08:49 出处:网络
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 tha

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

精彩评论

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