diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-01-26 19:37:18 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2016-01-26 19:37:18 +0000 |
commit | 520e81f98d7560cb39a9141c698723e2e36aa675 (patch) | |
tree | 6fb7885421e4c7e2c8c08187ca4963886ebdf1ea /amiga/utf8.c | |
parent | 9505b8e5143b3b11f86469818258f1b628053d08 (diff) | |
download | netsurf-520e81f98d7560cb39a9141c698723e2e36aa675.tar.gz netsurf-520e81f98d7560cb39a9141c698723e2e36aa675.tar.bz2 |
Alloc specifying local charset on OS3 as we can't get this from Locale
Diffstat (limited to 'amiga/utf8.c')
-rwxr-xr-x | amiga/utf8.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/amiga/utf8.c b/amiga/utf8.c index 9bf1b1adb..91d7c90c0 100755 --- a/amiga/utf8.c +++ b/amiga/utf8.c @@ -23,6 +23,7 @@ #include <proto/diskfont.h> #include <diskfont/diskfonttag.h> +#include "utils/nsoption.h" #include "utils/utf8.h" #include "desktop/gui_utf8.h" @@ -37,6 +38,8 @@ nserror utf8_from_local_encoding(const char *string, size_t len, char **result) charset = GetDiskFontCtrl(DFCTRL_CHARSET); encname = (const char *) ObtainCharsetInfo(DFCS_NUMBER, charset, DFCS_MIMENAME); +#else + encname = nsoption_charp(local_charset); #endif return utf8_from_enc(string,encname,len,result,NULL); @@ -51,6 +54,8 @@ nserror utf8_to_local_encoding(const char *string, size_t len, char **result) charset = GetDiskFontCtrl(DFCTRL_CHARSET); encname = (const char *) ObtainCharsetInfo(DFCS_NUMBER, charset, DFCS_MIMENAME); +#else + encname = nsoption_charp(local_charset); #endif return utf8_to_enc(string,encname,len,result); @@ -96,3 +101,4 @@ static struct gui_utf8_table utf8_table = { }; struct gui_utf8_table *amiga_utf8_table = &utf8_table; + |