blob: 6a71eec8479917fe428b0c37b69aebfe88993b45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
--- a/dev/null
+++ b/src/lib/forgiving_utf8.h
@@ -0,0 +1,17 @@
+// forgiving_utf8.h
+#ifndef FORGIVING_UTF8_H
+#define FORGIVING_UTF8_H
+
+#include <cstddef> // For size_t
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+size_t utf8_to_latin9(char *output, const char *input, size_t length);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // FORGIVING_UTF8_H
--- a/src/lib/nfo_data.cpp
+++ b/src/lib/nfo_data.cpp
@@ -14,6 +14,7 @@
#include "stdafx.h"
#include "nfo_data.h"
+#include "forgiving_utf8.h"
#include "util.h"
#include "sauce.h"
#include "ansi_art.h"
--- a/src/gtk/CMakeLists.txt
+++ b/src/gtk/CMakeLists.txt
@@ -26,6 +26,7 @@
main_window.cpp
nfo_view_ctrl.cpp
${INFEKT_SOURCE_DIR}/src/lib/gutf8.c
+ ${INFEKT_SOURCE_DIR}/src/lib/forgiving_utf8.c
${INFEKT_SOURCE_DIR}/src/lib/nfo_data.cpp
${INFEKT_SOURCE_DIR}/src/lib/nfo_hyperlink.cpp
${INFEKT_SOURCE_DIR}/src/lib/nfo_colormap.cpp
|