hi all,
I use the WebClient class to cominicate with HTTP server.
I use the following function for the GET method:
Dim wDownload As System.Net.WebClient = New System.Net.WebClient
Dim bHTML As Byte() = wDownload.DownloadData(sCompleteURL)
Dim sWebPage As String = Encoding.UTF7.GetChars(bHTML)
Return sWebPage
if I use Encoding.ASCII, only 'standard' letters are got correctly, but,
as I am italian, I need also other 'strange' letters, like à or è...
Encoding.ASCII will convert them with a ? (question mark)
using UTF8, it does not still work, i think it just erase those
characters....
using UTF7, it works better, but still not perfectly: è, ò, à, etc...
are ok, but ' or CHR(96) (`) are converted with a ?
using Unicode (no matter what kind), the text is lost, the function
returns no text.
How can I get the right text from a html page?
Thanks!
SiD` 1 1178
* SiD` <mi****@ngi.it> scripsit: I use the WebClient class to cominicate with HTTP server.
I use the following function for the GET method:
Dim wDownload As System.Net.WebClient = New System.Net.WebClient Dim bHTML As Byte() = wDownload.DownloadData(sCompleteURL) Dim sWebPage As String = Encoding.UTF7.GetChars(bHTML) Return sWebPage
if I use Encoding.ASCII, only 'standard' letters are got correctly, but, as I am italian, I need also other 'strange' letters, like à or è...
Encoding.ASCII will convert them with a ? (question mark)
Try 'Encoding.Default', which will pick up your ANSI code page.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Christopher H. Laco |
last post by:
Long story longer. I need to get web user input into a backend system
that a) only grocks single byte encoding, b) expectes the data transer
to be 1 bytes = 1 character, and c) uses the HP Roman-6...
|
by: Bill Burwell |
last post by:
I am converting a VB6 WebClass application to VB.Net. Used the VB upgrade
tool to do the conversion - and it left me a lot of little code things to
do. Did those code things and got my app to...
|
by: davisjoseph |
last post by:
Hi All,
I'm newbie to this XML world. My problem is to identify the encoding
type of XML at runtime. What currently I'm doing is checking whether
BOM is available in the XML; based on the BOM...
|
by: Demon News |
last post by:
I'm trying to do a transform (Using XmlTransform class in c#) and in the
Transform I'm specifying the the output xsl below:
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
the...
|
by: fitsch |
last post by:
Hi,
I am trying to write a generic RSS/Atom/OPML feed client. The problem
is, that those xml feeds may have different encodings:
- <?xml version="1.0" encoding="ISO-8859-1" ?>...
- <?xml...
|
by: Chris McDonough |
last post by:
ElementTree's XML serialization routine implied by tree._write(file,
node, encoding, namespaces looks like this (elided):
def _write(self, file, node, encoding, namespaces):
# write XML to file...
|
by: Christina |
last post by:
Hey Guys,
Currently, I am using the below code:
Dim oReqDoc as XmlDocument
Dim requiredBytes As Byte()
requiredBytes =
System.Text.UTF8Encoding.UTF8.GetBytes(oReqDoc.InnerXml).
Here, I am...
|
by: mortb |
last post by:
1. How do I determine which encoding a xmldocument or xmlreader uses when
opening a document?
I'm not just talking about the <?xml encoding="utf-8"?attribute, but the
actual encoding of the...
|
by: ujjwaltrivedi |
last post by:
Hey guys,
Can anyone tell me how to create a text file with Unicode Encoding. In
am using
FileStream Finalfile = new FileStream("finalfile.txt",
FileMode.Append, FileAccess.Write);
...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |