<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.dotnetzone.gr:443/cs/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET WebForms</title><link>https://www.dotnetzone.gr:443/cs/forums/13/ShowForum.aspx</link><description>Θέματα για web εφαρμογές, σε ASP.NET WebForms</description><dc:language>el</dc:language><generator>CommunityServer 2.1 SP3 (Build: 20423.1)</generator><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/26092.aspx</link><pubDate>Thu, 08 Mar 2007 09:08:28 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:26092</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/26092.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=26092</wfw:commentRss><description>&lt;P&gt;WinHttpRequest saga...&lt;/P&gt;
&lt;P&gt;Σε συνέχεια των προηγουμένων, τελικά δεν φταίει ο server. Ανέβασα μια html σελίδα με ελληνικά και το παρακάτω meta:&lt;/P&gt;
&lt;P&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=windows-1253" /&amp;gt;&lt;/P&gt;
&lt;P&gt;Τώρα, υποτίθεται ότι το WinHttpRequest.ResponseText μετατρέπει αυτόματα τα data σε Unicode string. Αυτό γίνεται βάσει του charset attribute στο Content-Type response header. Αν αυτός δεν υπάρχει ή αν υπάρχει αλλά δεν έχει charset attribute, τότε χρησιμοποιεί το default ISO-8859-1. Πράγμα που σημαίνει ότι το &lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// Instantiate a WinHttpRequest object.&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:blue;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;var&lt;/SPAN&gt; WinHttpReq &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;=&lt;/SPAN&gt; new &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:red;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;ActiveXObject&lt;/SPAN&gt;(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"WinHttp.WinHttpRequest.5.1"&lt;/SPAN&gt;);&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// Initialize an HTTP request. &lt;/SPAN&gt;&lt;BR&gt;WinHttpReq.Open(&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"GET"&lt;/SPAN&gt;, &lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:#666666;FONT-FAMILY:Courier New;BACKGROUND-COLOR:#e4e4e4;"&gt;"http://www.intrip.gr/test/test.html"&lt;/SPAN&gt;, false);&lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// Send the HTTP request.&lt;/SPAN&gt;&lt;BR&gt;WinHttpReq.Send(); &lt;BR&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:green;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;// Display the response text.&lt;/SPAN&gt;&lt;BR&gt;WScript.Echo( WinHttpReq.ResponseText);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;FONT face=Tahoma size=2&gt;θα πρέπει να παίζει σωστά, εμφανίζοντας τα Ελληνικά... Έλα μου ντε που δεν το κάνει. &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;FONT face=Tahoma size=2&gt;Έχει κανείς καμιά ιδέα; &lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="FONT-WEIGHT:normal;FONT-SIZE:11px;COLOR:black;FONT-FAMILY:Courier New;BACKGROUND-COLOR:transparent;"&gt;&lt;FONT face=Tahoma size=2&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23873.aspx</link><pubDate>Tue, 23 Jan 2007 08:43:41 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23873</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23873.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23873</wfw:commentRss><description>Πολύ καλά τα λες! Ευτυχώς που το cheat παίζει μια χαρά &lt;img src="/cs/emoticons/emotion-1.gif" alt="Smile" /&gt;&lt;br /&gt;
&lt;br /&gt;
Παλιά λέγαμε "Garbage in, garbage out". Τώρα, έχει γίνει το ανάποδο! "Garbage out, garbage in"</description></item><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23866.aspx</link><pubDate>Tue, 23 Jan 2007 03:48:34 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23866</guid><dc:creator>George J. Capnias</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23866.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23866</wfw:commentRss><description>&lt;P&gt;Πιστεύω ότι το πρόβλημα είναι στο Response.Codepage στο server και ότι και να κάνει στο Request το αποτέλεσμα δεν θα αλλάξει...&lt;/P&gt;
&lt;P&gt;Από την άλλη μεριά, μπορούμε να κάνουμε μια μικρή "ζαβολιά" στο client...&lt;/P&gt;
&lt;P&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: Maroon;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;script&lt;/span&gt; &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;type&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;="text/vbscript"&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;Function GetText(strUrl) 'As String&lt;br /&gt;    Dim web, tmpBuffer, iCounter&lt;br /&gt;    &lt;br /&gt;    Set web = CreateObject("WinHttp.WinHttpRequest.5.1")&lt;br /&gt;    &lt;br /&gt;    web.Open "GET", strURL, false &lt;br /&gt;    web.Send &lt;br /&gt;            &lt;br /&gt;    tmpBuffer = web.ResponseText&lt;br /&gt;    GetText = ""&lt;br /&gt;    for iCounter=1 to Len(tmpBuffer)&lt;br /&gt;        if ascW(mid(tmpBuffer, iCounter, 1))&amp;gt;127 then&lt;br /&gt;            GetText = GetText &amp;amp; chr(ascW(mid(tmpBuffer, iCounter, 1)))&lt;br /&gt;        else&lt;br /&gt;            GetText = GetText &amp;amp; mid(tmpBuffer, iCounter, 1)&lt;br /&gt;        end if&lt;br /&gt;    next&lt;br /&gt;    &lt;br /&gt;    Set web = Nothing&lt;br /&gt;End Function&lt;br /&gt;--&amp;gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: Maroon;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;script&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Έτσι αλλάζουμε την κωδικοσελίδα της απάντησης στα ελληνικά... &lt;img src="/cs/emoticons/emotion-2.gif" alt="Big Smile" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;George J.&lt;BR&gt;&lt;/P&gt;</description></item><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23856.aspx</link><pubDate>Tue, 23 Jan 2007 01:01:30 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23856</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23856.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23856</wfw:commentRss><description>Πρόσθεσα αυτό που είπες Νατάσα, διόρθωσα και το destination encoding αλλά τίποτα. Και πάλι δεν δουλεύει...</description></item><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23854.aspx</link><pubDate>Tue, 23 Jan 2007 00:42:34 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23854</guid><dc:creator>Νατάσα Μανουσοπούλου</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23854.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23854</wfw:commentRss><description>Πρέπει να προσθέσεις στα headers σου και το κατάλληλο Accept-Charset, π.χ.&lt;br&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;web.setRequestHeader &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"Accept-Charset"&lt;/span&gt;, &lt;span style="color: #666666;background-color: #e4e4e4;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;"windows-1253;q=1"&lt;/span&gt; &lt;/span&gt;&lt;br&gt;</description></item><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23848.aspx</link><pubDate>Mon, 22 Jan 2007 22:11:30 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23848</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23848.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23848</wfw:commentRss><description>&lt;P&gt;Δεν κατεβάζω σελίδα με το HttpRequest. Είναι plain text το περιεχόμενο. Φαντάσου κάτι ως &lt;BR&gt;&lt;BR&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: Maroon;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;html&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;κείμενο κείμενο κείμενο κείμενο κείμενο κείμενο &lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: Maroon;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;html&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;BR&gt;&lt;BR&gt;Για το destination encoding θα το κοιτάξω...&lt;/P&gt;</description></item><item><title>Απ: WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23847.aspx</link><pubDate>Mon, 22 Jan 2007 22:00:25 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23847</guid><dc:creator>spantos</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23847.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23847</wfw:commentRss><description>- Ποιο είναι το encoding της σελίδας που κατεβάζεις με HttpRequest?&lt;br /&gt;
&lt;br /&gt;
- Ποιο είναι το encoding της σελίδας στην οποία γράφεις το Response?</description></item><item><title>WinHttp.WinHttpRequest και Ελληνικά</title><link>https://www.dotnetzone.gr:443/cs/forums/thread/23843.aspx</link><pubDate>Mon, 22 Jan 2007 21:35:53 GMT</pubDate><guid isPermaLink="false">2622095e-976c-431a-859e-16783ec7ecd7:23843</guid><dc:creator>KelMan</dc:creator><slash:comments>0</slash:comments><comments>https://www.dotnetzone.gr:443/cs/forums/thread/23843.aspx</comments><wfw:commentRss>https://www.dotnetzone.gr:443/cs/forums/commentrss.aspx?SectionID=13&amp;PostID=23843</wfw:commentRss><description>&lt;P&gt;Χρησιμοποιώ το WinHttp.WinHttpRequest object από client-side κώδικα, περίπου όπως παρακάτω:&lt;/P&gt;
&lt;P&gt;&lt;span style="color: Black;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: Maroon;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;script&lt;/span&gt; &lt;span style="color: Red;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;type&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;="text/vbscript"&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;Function GetText(strUrl) 'As String&lt;br /&gt;    Dim web&lt;br /&gt;    Set web = CreateObject("WinHttp.WinHttpRequest.5.1")&lt;br /&gt;    &lt;br /&gt;    web.Open "GET", strURL, false &lt;br /&gt;    web.setRequestHeader "Content-Type", "text/html; charset=windows-1253"&lt;br /&gt;    web.Send &lt;br /&gt;            &lt;br /&gt;    GetText = web.ResponseText &lt;br /&gt;    Set web = Nothing&lt;br /&gt;End Function&lt;br /&gt;--&amp;gt;&lt;br /&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: Maroon;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;script&lt;/span&gt;&lt;span style="color: Blue;background-color: Transparent;font-family: Courier New;font-size: 11px;font-weight: normal;"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Και παρακάτω, μέσα από document.write, καλώ την GetText περνώντας το ανάλογο URL. Αυτά που μου επιτρέφει το ULR είναι plain text όμως Ελληνικά... γιοκ! Το ίδιο URL αν απλά το δώσω μέσα από τον IE, μου φέρνει κανονικά το κείμενο με Ελληνικά. Έχω δοκιμάσει διάφορα Content-Type αλλά δεν είδα φως. Έχει κανείς καμιά ιδέα;&lt;/P&gt;</description></item></channel></rss>