<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; VBS: responseText возвращает кривой текст]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=5711</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=5711&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «VBS: responseText возвращает кривой текст».]]></description>
		<lastBuildDate>Wed, 13 Apr 2011 08:05:10 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47579#p47579</link>
			<description><![CDATA[<p>Если так то хорошо, десктоптных вполне достаточно.</p>]]></description>
			<author><![CDATA[null@example.com (mikser)]]></author>
			<pubDate>Wed, 13 Apr 2011 08:05:10 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47579#p47579</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47576#p47576</link>
			<description><![CDATA[<p><strong>2 mikser:</strong> &quot;Во всех&quot; это слишком неопределённое понятие. Начиная с Windows 95 присутствует (на сколько мне удалось выяснить). Или вас интересует Windows 3.X / Windows CE / Windows Mobile ? <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Xameleon)]]></author>
			<pubDate>Wed, 13 Apr 2011 05:21:51 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47576#p47576</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47574#p47574</link>
			<description><![CDATA[<p>А ADOdb разве во всех виндах есть?</p>]]></description>
			<author><![CDATA[null@example.com (mikser)]]></author>
			<pubDate>Tue, 12 Apr 2011 20:44:11 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47574#p47574</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47566#p47566</link>
			<description><![CDATA[<p>OFF: Ура повторному открытию Америки и изобретению велосипеда ! <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p><p>Господа, пользуйтесь коллекцией. <strong>The gray Cardinal</strong> и другие участники форума не зря её делали.<br /><a href="http://forum.script-coding.com/viewtopic.php?id=997">http://forum.script-coding.com/viewtopic.php?id=997</a></p><p>Рекомендую начинать поиски решений именно с неё. Многое уже давно было решено и открыто.</p>]]></description>
			<author><![CDATA[null@example.com (Xameleon)]]></author>
			<pubDate>Tue, 12 Apr 2011 10:28:09 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47566#p47566</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47540#p47540</link>
			<description><![CDATA[<p>А казалось бы а причем тут DB. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (mikser)]]></author>
			<pubDate>Mon, 11 Apr 2011 12:20:28 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47540#p47540</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47529#p47529</link>
			<description><![CDATA[<p>Всем спасибо! <br />Помогло следующие решение следующего вида:</p><div class="codebox"><pre><code>Set HTTP = CreateObject(&quot;Msxml2.ServerXMLHTTP.5.0&quot;)
HTTP.setProxy 2, &quot;10.10.10.3:8080&quot;
xmlString = &quot;&lt;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXx&lt;/XML&gt;&quot;
HTTP.Open &quot;POST&quot;, &quot;http://XXXXXXXXXXXX:8080/XXXXXXX/&quot;
HTTP.Send(xmlString)
OTVET = HTTP.responseBody
set VStream = WScript.CreateObject(&quot;ADODB.Stream&quot;)
VStream.Type = 1
VStream.Open
VStream.Write OTVET
VStream.Position = 0
VStream.Type = 2
VStream.Charset = &quot;windows-1251&quot;
OTVET = VStream.ReadText
MsgBox (OTVET)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (evgennet)]]></author>
			<pubDate>Mon, 11 Apr 2011 07:36:44 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47529#p47529</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47476#p47476</link>
			<description><![CDATA[<p><strong>evgennet</strong><br />Определите тип кодировки.<br />Вот тут в конце есть <a href="http://ru.wikipedia.org/wiki/Крякозябры">образцы крякозябр</a>.<br />Потом можете&nbsp; написать свои функции перекодировки. Ну или возьмите мою:<br /></p><div class="codebox"><pre><code>
var ANSI = (&quot;№|&amp;bull;|&quot; +
&quot;А|Б|В|Г|Д|Е|Ё|Ж|З|И|Й|&quot; + 
&quot;К|Л|М|Н|О|П|Р|С|Т|У|Ф|&quot; + 
&quot;Х|Ц|Ч|Ш|Щ|Ъ|Ы|Ь|Э|Ю|Я|&quot; + 
&quot;а|б|в|г|д|е|ё|ж|з|и|й|&quot; + 
&quot;к|л|м|н|о|п|р|с|т|у|ф|&quot; + 
&quot;х|ц|ч|ш|щ|ъ|ы|ь|э|ю|я&quot;).split(&quot;|&quot;);


var W1251 = (&quot;в„–|вЂ”|&quot; + 
&quot;Рђ|Р‘|Р’|Р“|Р”|Р•|РЃ|Р–|Р—|Р&amp;#65533;|Р™|&quot; + 
&quot;Рљ|Р›|Рњ|Рќ|Рћ|Рџ|Р |РЎ|Рў|РЈ|Р¤|&quot; + 
&quot;РҐ|Р¦|Р§|РЁ|Р©|РЄ|Р«|Р¬|Р­|Р®|РЇ|&quot; + 
&quot;Р°|Р±|РІ|Рі|Рґ|Рµ|С‘|Р¶|Р·|Рё|Р№|&quot; + 
&quot;Рє|Р»|Рј|РЅ|Рѕ|Рї|СЂ|СЃ|С‚|Сѓ|С„|&quot; + 
&quot;С…|С†|С‡|С?|С‰|СЉ|С‹|СЊ|СЌ|СЋ|СЏ&quot;).split(&#039;|&#039;);
var hW1251 ={}; //хешь декодировки
for (var i in W1251)
hW1251[W1251[i]] = ANSI[i];

var reW1251 = new RegExp(&quot;(&quot; + W1251.join(&#039;|&#039;) + &quot;)&quot;, &#039;g&#039;)


function win1251_decode(s)
{
        return s.replace(reW1251, function (p)
        {
                return hW1251[p] ? hW1251[p] : p
        })
} //func</code></pre></div><p>Функция win1251_decode - преобразует utf8 строку&nbsp; в читаемую.</p><p>PS Движок форума неправильно преобразовал некоторые символы строки скрипта в HTML сущности...</p><p>Еще можно попробовать заставить браузер это делать. <br />Код для HTA.<br /></p><div class="codebox"><pre><code>//псевдо код :) Не уверен что все правильно тут
function decode()
{
var subBrowser= document.createElement(&quot;IFRAME&quot;)
subBrowser.window.document.write(&#039;&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=&#039;+Правильная_кодировка+&#039;&quot; /&gt;&#039;)
subBrowser.window.document.write(Ваш_текст_в_неправильной_кодировке)
subBrowser.window.document.close()

return subBrowser.window.document.body.innerText
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (mikser)]]></author>
			<pubDate>Fri, 08 Apr 2011 15:55:48 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47476#p47476</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47471#p47471</link>
			<description><![CDATA[<p>Конвертировать посредством «ADODB.Stream» из UTF-8, если я правильно понял о чём речь.</p>]]></description>
			<author><![CDATA[null@example.com (alexii)]]></author>
			<pubDate>Fri, 08 Apr 2011 14:47:52 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47471#p47471</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47468#p47468</link>
			<description><![CDATA[<p>А есть решение на клиентской стороне ?</p>]]></description>
			<author><![CDATA[null@example.com (Евген)]]></author>
			<pubDate>Fri, 08 Apr 2011 13:53:08 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47468#p47468</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47466#p47466</link>
			<description><![CDATA[<p>Точнее будет так:<br /></p><div class="codebox"><pre><code>Content-Type: text/html; charset=&lt;...&gt;</code></pre></div><div class="codebox"><pre><code>Content-Type: application/xml; charset=&lt;...&gt;</code></pre></div><p>Укажите правильное название кодировки вместо &lt;...&gt;</p>]]></description>
			<author><![CDATA[null@example.com (Rumata)]]></author>
			<pubDate>Fri, 08 Apr 2011 12:37:43 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47466#p47466</guid>
		</item>
		<item>
			<title><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47464#p47464</link>
			<description><![CDATA[<p>Если сервер ASP, то сделай следующее...</p><div class="codebox"><pre><code>&lt;% Response.Charset= &quot;win-1251&quot; %&gt;</code></pre></div><p>ну или какую надо кодировку...</p>]]></description>
			<author><![CDATA[null@example.com (Евген)]]></author>
			<pubDate>Fri, 08 Apr 2011 11:51:41 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47464#p47464</guid>
		</item>
		<item>
			<title><![CDATA[VBS: responseText возвращает кривой текст]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=47462#p47462</link>
			<description><![CDATA[<p>Доброе время суток!<br />Два дня бьюсь, не могу решить проблему!<br />Post запрос возвращает XML строку в которой русские символы нечитаемые!<br />Помогите кто чем может!!!</p><p>Пример скрипта:</p><div class="codebox"><pre><code>Set HTTP = CreateObject(&quot;Msxml2.ServerXMLHTTP.5.0&quot;)
HTTP.setProxy 2, &quot;10.10.10.3:8080&quot;
xmlString = &quot;&lt;XXXXXXXXXXXXXXXXXXXXXXXXXXXXXx&lt;/XML&gt;&quot;
HTTP.Open &quot;POST&quot;, &quot;http://XXXXXXXXXXXX:8080/XXXXXXX/&quot;
HTTP.Send(xmlString)
MsgBox (HTTP.responseText)</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (evgennet)]]></author>
			<pubDate>Fri, 08 Apr 2011 11:11:58 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=47462#p47462</guid>
		</item>
	</channel>
</rss>
