question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read special characters

See original GitHub issue

Hi. Thanks for your work. I have a problem with special characters in csv file. With cell value are: ość, chào cưng, số học … it can not read, it shows os___, and chˆo c_ng, Could you tell me how to keep original format. Here is my file: https://drive.google.com/file/d/16hpgli5ZOzSsEob4_14Q2WDBDtFEFiJU/view?usp=sharing and here is my code: https://stackblitz.com/edit/react-excel-to-json-parser?file=ExcelReader.js

Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
SheetJSDevcommented, Aug 16, 2020

Can’t access the file @hungdev but most likely you’re specifying a UTF-8 file without the BOM. Without the BOM, Excel defaults to the local codepage. To force UTF-8 treatment, pass the option codepage: 65001 to read or readFile

0reactions
Dshah-bbcommented, Oct 7, 2020

@SheetJSDev Can you please let me know what should be done in case of write to UTF-8 with BOM? Below is the sample of the code I am using `this.workBookCreator.setReport(report); this.workBookCreator.setTranslations(translations); this.workBookCreator.setReportMetadata(reportMetadata); this.workBookCreator.setColumnsToIncludeInReport(columnsToIncludeInReport); this.workBookCreator.setTypeHints(typeHints); this.workBookCreator.setCustomFields(customFields);

    let workbook: WorkBook = this.workBookCreator.getWorkbook(workBookName);

    return this.xlsxModule.write(workbook, {
        bookType: 'csv',
        type: "string"
    });`

When I try to open this file in Excel it is not considering UTF-8 and the special characters are broken

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read special characters correctly in BufferedReader
I have created code to read data from a csv file. However, I cannot handle special characters such as £. For example, My...
Read more >
Cannot read special characters · Issue #280 - GitHub
Hi Josh, How can i read value like 'Génifique '? I set the Encoding to Unicode but it's still happen. The character 'é'...
Read more >
How to deal with special characters in CSV - CSV Loader
Examining special characters in CSV, including what they are and how to support ... A special character is any character that is not...
Read more >
Read Special Characters with LabVIEW - NI - Support
Read Special Characters with LabVIEW · 1. On the Block Diagram right click to open the Controls Palette >> File I/O >> Open/Create/Replace...
Read more >
read special character problem - MSDN - Microsoft
my program cannot recognized the special characters.. Lets say, i want read value between 2 "FS". Example: FS000FS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found