xlsxio icon indicating copy to clipboard operation
xlsxio copied to clipboard

xlsxioread_sheetlist_next returns wrong cyrillic name

Open dezmen3 opened this issue 2 years ago • 1 comments

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

dezmen3 avatar Jan 08 '23 00:01 dezmen3

The resulting name should be UTF-8. Which encoding did you use to display the name?

brechtsanders avatar Jan 08 '23 12:01 brechtsanders