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

  • Home
  • SEARCH
  • 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 896637
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:45:34+00:00 2026-05-15T14:45:34+00:00

I took over some old php application with MySQL as database. Inside the database,

  • 0

I took over some old php application with MySQL as database. Inside the database, there are tables including content with localized strings (therefore containing special chars)

Currently there is a PHP application accessing that database. My job is to create an ASP.net (C# codebehind) application that accesses that strings as well. That works, as far as encoding goes.

If I try to access these strings, I do get a kind of encoding problem, like ‘Ändern’ and ‘Prüfzeichen’, but only in the ASP.net application. The PHP app sets utf-8 as charset and the strings are perfectly rendered. In the ASP.net application it’s gibberish, regardless of the page encoding.

In the MySQL database, the charset for the specified table ‘translations’ is set to ‘latin –cp1252 West European’ and collation to ‘latin_swedish_ci’.

I can’t seem to figure out what PHP apparently does, and ASP.net does not. I traced the php code and could not find any sign of special encoding while getting a string from the database.

The question is, how can I ensure correct encoding inside the ASP.net application without modifying the database, because big changes at the php code are not possible?

Does anybody have a clue?

  • 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-15T14:45:35+00:00Added an answer on May 15, 2026 at 2:45 pm

    If finally managed to find way to convert into UTF8.

    System.Text.Encoding.UTF8.GetString(System.Text.Encoding.Default.GetBytes("convert me"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I took over the development of an application which enables users to download some
I took over an old HTML based site with all hard coded links, no
I recently took over a project that has a pretty dirty database... The table
I recently took over management of a Windows 2003 server. The application log is
Recently I encountered a bug in an application I took over from another developer.
I took an existing MySQL database, and set up a copy on a new
It took me quite a bit of experimentation to clear up some confusion over
Some time ago we took over the responsibility of a legacy code base. One
I'm having some performance issues with MySQL database due to it's normalization. Most of
When looking through some code I took over, I came across this line: my

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.