xlsxio
xlsxio copied to clipboard
xlsxioread_sheetlist_next returns wrong cyrillic name
When trying to read all spreadsheet names from xlsx file, i'm getting correct english names, but cyrillic symbols turns into giberrish ones instead cyrillic letters. ` const char* input_file = argv[1]; xlsxioreader xlsxioread; if ((xlsxioread = xlsxioread_open(input_file)) == NULL) { fprintf(stderr, "Error opening XLSX file: %s\n", input_file); return 1; }
xlsxioreadersheetlist sheetlist;
const XLSXIOCHAR* sheetname = NULL;
if ((sheetlist = xlsxioread_sheetlist_open(xlsxioread)) != NULL) {
while ((sheetname = xlsxioread_sheetlist_next(sheetlist)) != NULL) {
//work with name
}
}
`
Default cyrillic name in excel is "Лист1", xlsxioread_sheetlist_next gives it as "Лист1". Same thing with priting it to txt using fputs, in notepad++ it shows fine, but when you view it in Hex, it does same faulty symbols
The resulting name should be UTF-8. Which encoding did you use to display the name?