<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; PHP: Перевод Unicode строки в HEX и обратно]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10456&amp;type=atom" />
	<updated>2015-04-04T12:24:15Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10456</id>
		<entry>
			<title type="html"><![CDATA[Re: PHP: Перевод Unicode строки в HEX и обратно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92994#p92994" />
			<content type="html"><![CDATA[<p>Проверил на php 5.3, работает отлично!<br />Благодарю!</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-04-04T12:24:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92994#p92994</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PHP: Перевод Unicode строки в HEX и обратно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92989#p92989" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>function hex2bin($hex) {
    $str = &quot;&quot;;
    for ($i = 0; $i &lt; strlen($hex); $i += 2)
        $str .= chr(hexdec(substr($hex, $i, 2)));
    return $str;
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2015-04-04T10:51:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92989#p92989</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PHP: Перевод Unicode строки в HEX и обратно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92869#p92869" />
			<content type="html"><![CDATA[<p>Еще такой вопрос, что можно использовать, что бы в данном решении заменить функцию hex2bin на такую которая будет выполнять то же действие на php версии 5.3&nbsp; ?<br />Потому как функция hex2bin работает только начиная с версии php 5.4<br />На некоторых хостингах доступно только 5.3 или же при выборе более новой версии надо менять PHP как Apache на PHP как CGI.</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-03-31T13:42:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92869#p92869</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PHP: Перевод Unicode строки в HEX и обратно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92028#p92028" />
			<content type="html"><![CDATA[<p>В поиске искал так ничего внятного не находил.<br />Благодарю, то что надо!</p>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-02-27T06:53:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92028#p92028</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: PHP: Перевод Unicode строки в HEX и обратно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=92000#p92000" />
			<content type="html"><![CDATA[<p><a href="http://ideone.com/G2W5Fy">http://ideone.com/G2W5Fy</a>:<br /></p><div class="codebox"><pre><code>echo bin2hex(iconv(&#039;UTF-8&#039;, &#039;UTF-16BE&#039;, &#039;Привет Мир!&#039;));
echo &quot;\n&quot;;
echo iconv(&#039;UTF-16BE&#039;, &#039;UTF-8&#039;, hex2bin(&#039;041f044004380432043504420020041c043804400021&#039;));</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2015-02-26T16:42:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=92000#p92000</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[PHP: Перевод Unicode строки в HEX и обратно]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=91980#p91980" />
			<content type="html"><![CDATA[<p>Как можно на PHP перевести Unicode UTF-16 строку в HEX и обратно?<br /></p><div class="codebox"><pre><code>str = Привет Мир!

hex = 041f044004380432043504420020041c043804400021</code></pre></div>]]></content>
			<author>
				<name><![CDATA[avens]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24487</uri>
			</author>
			<updated>2015-02-26T12:01:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=91980#p91980</id>
		</entry>
</feed>
