You are here: Re: Problem with multi-byte characters with curl « PHP Programming Language « IT news, forums, messages
Re: Problem with multi-byte characters with curl

Posted by Stephen Kay on 03/23/06 03:04

in article C0475AB8.59ECA%sk@karma-lab.nospam.com, Stephen Kay at
sk@karma-lab.nospam.com wrote on 3/22/06 7:52 PM:

>
> I am writing some php functions to run pages of my web site through
> altavista's babelfish language translation services.
>
> It works, kind of, but I have run into a problem with multi-byte
> international characters.
>
> If I call the desired URL query string directly by typing it into a browser,
> it returns a doc, showing in the header:
>
> http-equiv="content-type" content="text/html; charset=UTF-8
>
> and properly displays the additional international characters.
>
> If I call the exact same URL from inside my php code, using curl, the
> resulting document appears to have the same UTF-8 encoding in the header,
> yet the international characters are lost. I just get ? instead.


Nevermind, I found the answer:

Need to use mb_convert_encoding() on the results of curl.

--
Stephen Kay
Karma-Lab sk@karma-lab.NOSPAM.com
^^^^^^^

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация