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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:39:26+00:00 2026-05-13T09:39:26+00:00

How can I change the codepage I want to use on an operation such

  • 0

How can I change the codepage I want to use on an operation such as the one below?

string foo = (string)sqlCommand.ExecuteScalar();

As I understand I can wrap the method call inside a String.Format(IFormatProvider, String). That would be grand.

But how do I construct a IFormatProvider with a specific codepage so I can correctly read this particular data from my database that is stored in a different codepage than the rest of the database file?

More information:
– The database is a SQLite database.
– Data is in Portuguese.
– Data that I’m adding to the database externally displays incorrectly on my application.
– Data that I add through my application displays correctly.

I think I traced it down to the fact I think I’m adding data in UTF-8 format when doing it through my application. I’m using System.Data.SQLite provider and I’m may investigate further how I can change this behavior. On any case, I would like for now to read data that is being inserted into the database from external sources, which is not in UTF-8 format.

  • 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-05-13T09:39:27+00:00Added an answer on May 13, 2026 at 9:39 am

    No, String.Format (etc) is all to do with the client-side processing. If you really need to alter how the database is handling textual data, I’d expect that to be part of the SQL statement or possibly the connection string. (You may need to use a different connection for these particular queries.)

    Within .NET itself, all the text data will just be Unicode. To be honest, I’d hope that the database would know what was going on and handle the differences itself… but you haven’t given the details of what database you’re using or how one table uses a different encoding to others.

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

Sidebar

Related Questions

In MATLAB one can change the font name of things such as ylabel ,
I understand that I can change a sql table using the follow sp: EXEC
I want to know if you can change how a highcharts.js chart is rendered.
How can one change the formatting of output from the logging module in Google
How can i change another program icon(not mine) in C++ ? I want to
You can change the connection string at run-time like this. You make the connection
can any one tell me how can change this java code into objective c.is
I can change SQL at runtime. Can I do the same with LINQ ?
I can change the irb prompt mode with irb --prompt prompt-mode I can see
How i can change the color with gradient??? I have this now,but is different

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.