<commit_before>#pragma once

#include <QString>

class ImporterUtil {
public:
	/**
	* @brief Convert a given QString to a utf-8 encoded string (platform-independently)
	*/
	static const char* getUTF8String(const QString& string) {
#ifdef Q_OS_WIN
		return string.toLocal8Bit().constData();
#elif Q_OS_MAC
		return string.toUtf8().constData();
#elif BERRY_OS_LINUX
		return string.toStdString().constDatat(); // needs check/test
#endif
}
};<commit_msg>Improved utf 8 conversion<commit_after>#pragma once

#include <QString>

class ImporterUtil {
public:
	/**
	* @brief Convert a given QString to a utf-8 encoded string (platform-independently)
	*/
	static std::string getUTF8String(const QString& string) {
		return string.toLocal8Bit().toStdString();
	}
};
{'fraction_non_alphanumeric': 0.12169312169312169, 'fraction_numerical': 0.010582010582010581, 'mean_word_length': 5.256198347107438, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4325871', 'n_tokens_mistral': 256, 'n_tokens_neox': 251, 'n_words': 67}