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 9167691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:27:09+00:00 2026-06-17T15:27:09+00:00

I’ve a problem and I can’t understand what is causing it. I’m working on

  • 0

I’ve a problem and I can’t understand what is causing it. I’m working on a legacy website, written in Classic ASP (oh god why me), and sometimes at apparently random time without any explanation the values from ADODB.Recordset are printed double encoded.

With double encoded I mean the “UTF-8 encoding of the ASCII representation of an UTF-8 multibyte string” so the “é” would look like “é” (with the exact same encoding).

The thing that is driving me crazy is that this appears to happen at random time, the 50% of the times they are encoded correctly, the other 50% they aren’t.

Let me point out that it happens on the same page at different times, so after several page loads you could display them correctly, then broken, then again correctly and so on.

This thing happened 7 years ago in the early days of this website but a lot of water has passed under the bridge and only one of the guys that worked on this website in the first place still works in the company. He can’t remember what did they do to solve the issue, he left me saying only that “the database connection encodings were saved into the session”, and that perhaps can explain why there are so many Session.CodePage = 65001 around the page.

I even tried to force the charset to utf8 via query but clearly it didn’t work.

The driver used is the olde MySQL ODBC 3.51 Driver.

Thanks in advance for any advice or solution (get rid of Classic ASP unfortunately is not an option).

[UPDATE]

Here it is a plot twist, it breaks less times if I output the contents like this:

Session.CodePage = 1252
Response.Write(Property)
Session.CodePage = 65001

Actually I found this code almost everywhere in the website, as if the database driver didn’t care at all about the connection’s charset.

  • 1 1 Answer
  • 0 Views
  • 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-06-17T15:27:11+00:00Added an answer on June 17, 2026 at 3:27 pm

    I ran some tests, and thanks to @webaware’s advices I convinced myself to update the ODBC Driver to version 5.1 and after some tuning the websites seemed to stabilize, that’s the code I used:

    Response.AddHeader "Content-Type", "text/html; charset=UTF-8"
    Session.CodePage = 65001
    Dim ConnString:ConnString = "driver={MySQL ODBC 5.1 Driver};server=localhost;port=3306;database=database;uid=uid;pwd=pwd"
    

    Other combinations seem to break the output encoding, now it works out of the box.

    I hope this can help for the future.

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

Sidebar

Related Questions

I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a jquery bug and I've been looking for hours now, I can't
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I've tracked down a weird MySQL problem to the two different ways I was
I have been unable to fix a problem with Java Unicode and encoding. The
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string

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.