Output to csv, started work on OFD module

This commit is contained in:
2024-08-30 05:03:32 +03:00
parent 64e40071b2
commit d9fca88af3
21 changed files with 606 additions and 163 deletions

15
utils/utils.cpp Normal file
View File

@@ -0,0 +1,15 @@
#include "utils.h"
#include <codecvt>
#include <string>
#include <locale>
std::string to_utf8(std::wstring wide_string) {
static std::wstring_convert<std::codecvt_utf8<wchar_t>> utf8_conv;
return utf8_conv.to_bytes(wide_string);
}
std::wstring from_utf8(std::string string) {
static std::wstring_convert<std::codecvt_utf8<wchar_t>> utf8_conv;
return utf8_conv.from_bytes(string);
}

9
utils/utils.h Normal file
View File

@@ -0,0 +1,9 @@
#ifndef UTILS_H
#define UTILS_H
#include <string>
std::string to_utf8(std::wstring wide_string);
std::wstring from_utf8(std::string string);
#endif // UTILS_H