blob: ab718bc47a5d50cfac198dd85871cfe84f9140ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#pragma once
#include <string_view>
#include <openvic-dataloader/ParseWarning.hpp>
namespace ovdl::v2script::warnings {
inline const std::string make_utf8_warning(std::string_view file_path) {
constexpr std::string_view message_suffix = "This may cause problems. Prefer Windows-1252 encoding.";
std::string message;
if (file_path.empty()) {
message = "Buffer is a UTF-8 encoded string. " + std::string(message_suffix);
} else {
message = "File '" + std::string(file_path) + "' is a UTF-8 encoded file. " + std::string(message_suffix);
}
return message;
}
}
namespace ovdl::ovscript::warnings {
}
|