Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 962885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:34:52+00:00 2026-05-16T01:34:52+00:00

I have an app that is parsing the html page and extracts some text

  • 0

I have an app that is parsing the html page and extracts some text with foreign characters for example ‘Felvidék Ma’. Now I want to enter this into my database but not in this format but the original format. So can I convert it into utf 8 before writing to a sql server database or even writing to a textfile. here is the original term ‘Felvidék Ma’. I use regex expressions to parse the html so Im not sure if there is an option to assist with this. Here is my code:

 If Not String.IsNullOrEmpty(_html) Then
            'get all href tags in the html page
            Dim regex As Regex = New Regex( _
                        "<TotalFound>(?<link>.*?)</TotalFound>", _
                            RegexOptions.IgnoreCase _
                            Or RegexOptions.CultureInvariant _
                            Or RegexOptions.IgnorePatternWhitespace _
                            Or RegexOptions.Compiled _
                            )

            Dim ms As MatchCollection = regex.Matches(_html)
            Dim url As String = String.Empty
            For Each m As Match In ms
                url = m.Groups("link").Value
                If Not String.IsNullOrEmpty(url) Then

I found the source of my problem. it was when fetching the html page and reading the stream. I changed default encoding to UTF 8 and all is well now. Thanks again.

  Dim reader As StreamReader = New StreamReader(responseStream, Encoding.Default)
            returnContent = reader.ReadToEnd()
  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T01:34:53+00:00Added an answer on May 16, 2026 at 1:34 am

    with foreign characters for example ‘Felvidék Ma’

    That’s where your real trouble starts, there’s little you can do afterwards to fix this problem. It isn’t clear how you got the string, but it was created from the http stream without paying attention to the web page encoding. HttpResponse.ContentEncoding for example.

    Once you get this right, everything else is simple. No need to convert anything, what you write to the dbase is the actual text. If you cannot figure this out, be sure to update your question with details that describe how you got the _html string value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app in http://domain1/app1/called.html , and I want to embed that
I have a rails app that is parsing HTML using the nokogiri gem version
I'm aware that ItextSharp have some importants limitations about HTML and CSS Parsing. I'm
I have a page where I want to display some points on map. I
I'm trying to generate a JSON response that includes some HTML. Thus, I have
I have a silverlight app that uses a simple Login.aspx page. I have all
I'm making an app that parses html and gets images from it. Parsing is
have an app that finds your GPS location successfully, but I need to be
Have an app that has listings - think classified ads - and each listing
I have an app that needs to read a PDF file from the file

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.