• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

293
Views
c# my resource text file comes up with different Encoding when I read it with Streamreader

Here is the code that I am using to take text from my resource.rex and after that, I collect them on Listbox and then take one of them with a random method but some words show up like '?' I think their encoding changes after reading.

string okunanmetin = "";

Assembly assembly = Assembly.GetExecutingAssembly();
StreamReader reader = new StreamReader(assembly.GetManifestResourceStream("Takistoskop.Resources.5.txt"),Encoding.UTF8);

int i = 0;
while (true)
{
    i++;    
    okunanmetin = reader.ReadLine();
    if (okunanmetin == null) break;
    listBoxcekilenveri.Items.Add(" " + okunanmetin + "\r\n");
}
about 3 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error