Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xlsxioread_sheetlist_next returns wrong cyrillic name #119

Open
dezmen3 opened this issue Jan 8, 2023 · 1 comment
Open

xlsxioread_sheetlist_next returns wrong cyrillic name #119

dezmen3 opened this issue Jan 8, 2023 · 1 comment

Comments

@dezmen3
Copy link

dezmen3 commented Jan 8, 2023

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

@brechtsanders
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants