mirror of
https://github.com/kichikuou/system3-sdl2.git
synced 2026-10-04 21:08:04 +03:00
Add support for UTF-8 encoded scenario files
If `encoding = utf8` is specified in system3.ini, system3-sdl2 uses UTF-8 as its multibyte character encoding. It will be used to run games translated into non-(Japanese|English) languages.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <string.h>
|
||||
#include "crc32.h"
|
||||
#include "../fileio.h"
|
||||
#include "config.h"
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -156,3 +157,12 @@ Language NACT::get_language()
|
||||
return entry->language;
|
||||
return JAPANESE;
|
||||
}
|
||||
|
||||
const char* NACT::get_encoding_name(const Config& config)
|
||||
{
|
||||
if (!config.encoding.empty())
|
||||
return config.encoding.c_str();
|
||||
|
||||
// TODO: Determine encoding from crc32
|
||||
return "Shift_JIS";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user