termux-packages/packages/profanity/cmd_funcs.c.patch
Oliver Schmidhauser f2748b7e93 Update Profanity and Libstrophe to their latest versions (#461)
* Update libstrophe to version 0.9.1.
* Update profanity to version 0.5.0.
* Enable python plugin support for profanity.
2016-09-17 01:44:12 +02:00

28 lines
761 B
Diff

diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c
index f4b597c..b88092d 100644
--- a/src/command/cmd_funcs.c
+++ b/src/command/cmd_funcs.c
@@ -46,7 +46,9 @@
#include <sys/types.h>
#include <fcntl.h>
#include <unistd.h>
+#ifndef __ANDROID__
#include <langinfo.h>
+#endif
#include <ctype.h>
#include "profanity.h"
@@ -4746,7 +4748,11 @@ cmd_privileges(ProfWin *window, const char *const command, gchar **args)
gboolean
cmd_charset(ProfWin *window, const char *const command, gchar **args)
{
- char *codeset = nl_langinfo(CODESET);
+ #if defined(__ANDROID__)
+ char *codeset = "UTF-8";
+ #else
+ char *codeset = nl_langinfo(CODESET);
+ #endif
char *lang = getenv("LANG");
cons_show("Charset information:");