<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: responseText возвращает кривой текст]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=5711&amp;type=atom" />
	<updated>2011-04-13T08:05:10Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=5711</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47579#p47579" />
			<content type="html"><![CDATA[<p>Если так то хорошо, десктоптных вполне достаточно.</p>]]></content>
			<author>
				<name><![CDATA[mikser]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24962</uri>
			</author>
			<updated>2011-04-13T08:05:10Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47579#p47579</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47576#p47576" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Xameleon]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=8836</uri>
			</author>
			<updated>2011-04-13T05:21:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47576#p47576</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47574#p47574" />
			<content type="html"><![CDATA[<p>А ADOdb разве во всех виндах есть?</p>]]></content>
			<author>
				<name><![CDATA[mikser]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24962</uri>
			</author>
			<updated>2011-04-12T20:44:11Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47574#p47574</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47566#p47566" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Xameleon]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=8836</uri>
			</author>
			<updated>2011-04-12T10:28:09Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47566#p47566</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47540#p47540" />
			<content type="html"><![CDATA[<p>А казалось бы а причем тут DB. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[mikser]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24962</uri>
			</author>
			<updated>2011-04-11T12:20:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47540#p47540</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47529#p47529" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[evgennet]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26884</uri>
			</author>
			<updated>2011-04-11T07:36:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47529#p47529</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47476#p47476" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[mikser]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24962</uri>
			</author>
			<updated>2011-04-08T15:55:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47476#p47476</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47471#p47471" />
			<content type="html"><![CDATA[<p>Конвертировать посредством «ADODB.Stream» из UTF-8, если я правильно понял о чём речь.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-04-08T14:47:52Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47471#p47471</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47468#p47468" />
			<content type="html"><![CDATA[<p>А есть решение на клиентской стороне ?</p>]]></content>
			<author>
				<name><![CDATA[Евген]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25253</uri>
			</author>
			<updated>2011-04-08T13:53:08Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47468#p47468</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47466#p47466" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Rumata]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24846</uri>
			</author>
			<updated>2011-04-08T12:37:43Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47466#p47466</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47464#p47464" />
			<content type="html"><![CDATA[<p>Если сервер ASP, то сделай следующее...</p><div class="codebox"><pre><code>&lt;% Response.Charset= &quot;win-1251&quot; %&gt;</code></pre></div><p>ну или какую надо кодировку...</p>]]></content>
			<author>
				<name><![CDATA[Евген]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25253</uri>
			</author>
			<updated>2011-04-08T11:51:41Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47464#p47464</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBS: responseText возвращает кривой текст]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=47462#p47462" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[evgennet]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=26884</uri>
			</author>
			<updated>2011-04-08T11:11:58Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=47462#p47462</id>
		</entry>
</feed>
