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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:08:49+00:00 2026-05-27T06:08:49+00:00

I have a program that inputs text and sorts through it using a number

  • 0

I have a program that inputs text and sorts through it using a number of functions and the text should be readable regardless of the format, however, when a file saved to the Extended ASCII encoding is imported, any characters over 127 are ignored. Looking around, I can’t seem to see how to overcome this. The files are read fine in UTF-8 and Unicode. I’ve tried converting the strings to UTF-8, but the letters in question still just come up as question-mark like shapes instead. I can see that the values are correct: 0xBF for û, but they aren’t being interpreted as value.

Can anyone help me here, I’ve not done lots of work with this sort of thing before. I’m working in C# if that helps.

My current code for converting looks like this:

System.Text.UTF8Encoding u = new System.Text.UTF8Encoding();
byte[] asciiBytes = Encoding.UTF8.GetBytes(sd);
sd = u.GetString(asciiBytes);

Where sd is the string. When I import this string, I do not specify the text encoding:

string input = File.ReadAllText(fname);
...
parser(input);
  • 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-27T06:08:50+00:00Added an answer on May 27, 2026 at 6:08 am

    I can see that the values are correct: 0xBF for û

    That is not the utf-8 encoding for û, that would be a two byte sequence, 0xC3 + 0xBB. Clearly you guessed the file encoding wrong. The encoding for that character in Windows code page 1252, common in Western Europe and the Americas is 0xFB. Common in the UK as well, your country of residence. Did you reverse the digits?

    Use Encoding.Default instead.

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

Sidebar

Related Questions

I have program that has a variable that should never change. However, somehow, it
I have a program that reads and writes very large text files. However, because
Im writing a program that should read input via stdin, so I have the
I have program that runs fast enough. I want to see the number of
I have a program that creates a Windows user account using the NetUserAdd() API
I have a program that uses the mt19937 random number generator from boost::random. I
I have a Pygame program that needs text input. The way it does this
I have a program which recieves inputs in the form of text for example
I have a search program that has multiple input text boxes that correspond to
Suppose I have a simple C++ program that takes in inputs and outputs some

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.