Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

773
Views
FileReader - readAsText encoding both utf-8 and ANSI

I'm using the API readAsText for getting the content from file with french characters

encoding = "UTF-8"
reader.readAsText(e.target.files.item(0), encoding)

The files could be encoding by UTF-8 or ANSI, in this case it is not working for ANSI file while reading UTF-8 and also not working for UTF-8 file while reading ANSI file.

I've tried ISO-8859-1, ISO-8859-3, ISO-8859-4, CP1251, latin1, none of them work for both.

So is there a way to read both utf-8 and ANSI, or whith encoding I should use for french file ? thanks for help

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!