-
Notifications
You must be signed in to change notification settings - Fork 400
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
Unicode support #215
Comments
Hi @rudolfninja, I'm glad to hear that it's easy to use. Unicode is supported throughout the library. For the most part, |
When I'm trying to write Russian text to cell or when I'm trying to open(save) file with Russian name. |
How are you initializing the filename string? If it's a string literal in the source file, you need to use the appropriate prefix to ensure the correct encoding is used, probably L"" or u8"". See here for more info http://en.cppreference.com/w/cpp/language/string_literal . You also need to save the file with the correct encoding (in VS, File->Save with encoding->UTF-8). If you're getting the string from an argument or somewhere else, you need to make sure it's correctly encoded when you receive it. |
I'm getting string as a command line argument. I'll try to find the way to check it somehow |
Linux or Windows? If Windows, you'll probably need to use the Windows-specific entry point that passes arguments as strings of int wmain(int argc, wchar_t *argv[])
{
const auto arg1 = std::wstring(argv[1]);
...
} If needed, convert a #include <codevt>
#include <locale>
...
std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
const auto utf8_string = converter.to_bytes(wchar_string); |
|
Glad to hear it! |
I tried your lib and it seemed very user friendly, thank you for that.
But I faced with problem handling files with uncode (cyrrilic) symbols.
Is it planned to add unicode support or is there any workaround to make your lib "understand" unicode?
I need to write unicode-strings in cells, but there is no suitable function.
Thanks.
The text was updated successfully, but these errors were encountered: