Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add utf-8 conversion utilities and re-add intlGUIEditBox
- Loading branch information
Showing
10 changed files
with
1,966 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- a/libcharset/lib/localcharset.c 2015-06-10 11:55:25.933870724 +0200 | ||
+++ b/libcharset/lib/localcharset.c 2015-06-10 11:55:39.578063493 +0200 | ||
@@ -47,7 +47,7 @@ | ||
|
||
#if !defined WIN32_NATIVE | ||
# include <unistd.h> | ||
-# if HAVE_LANGINFO_CODESET | ||
+# if HAVE_LANGINFO_CODESET && !(defined __ANDROID__) | ||
# include <langinfo.h> | ||
# else | ||
# if 0 /* see comment below */ | ||
@@ -124,7 +124,7 @@ get_charset_aliases (void) | ||
cp = charset_aliases; | ||
if (cp == NULL) | ||
{ | ||
-#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) | ||
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__ || defined __ANDROID__) | ||
const char *dir; | ||
const char *base = "charset.alias"; | ||
char *file_name; | ||
@@ -338,6 +338,9 @@ get_charset_aliases (void) | ||
"CP54936" "\0" "GB18030" "\0" | ||
"CP65001" "\0" "UTF-8" "\0"; | ||
# endif | ||
+# if defined __ANDROID__ | ||
+ cp = "*" "\0" "UTF-8" "\0"; | ||
+# endif | ||
#endif | ||
|
||
charset_aliases = cp; | ||
@@ -361,7 +364,7 @@ locale_charset (void) | ||
const char *codeset; | ||
const char *aliases; | ||
|
||
-#if !(defined WIN32_NATIVE || defined OS2) | ||
+#if !(defined WIN32_NATIVE || defined OS2 || defined __ANDROID__) | ||
|
||
# if HAVE_LANGINFO_CODESET | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
From fe27aae178d65b06d5f4104158343b0d2d33e3f0 Mon Sep 17 00:00:00 2001 | ||
From: Pierre Zurek <pierrezurek@gmail.com> | ||
Date: Sat, 2 Apr 2011 23:11:57 +0200 | ||
Subject: [PATCH] Added Android.mk. | ||
|
||
This makefile first executes the configure script, that will | ||
generate the config.h files necessary to build iconv. | ||
--- | ||
Android.mk | 29 +++++++++++++++++++++++++++++ | ||
1 file changed, 29 insertions(+) | ||
create mode 100644 Android.mk | ||
|
||
diff --git a/jni/Android.mk b/jni/Android.mk | ||
new file mode 100644 | ||
index 0000000..799b22d | ||
--- /dev/null | ||
+++ b/jni/Android.mk | ||
@@ -0,0 +1,32 @@ | ||
+LOCAL_PATH := $(call my-dir) | ||
+include $(CLEAR_VARS) | ||
+ | ||
+LOCAL_ARM_MODE := arm | ||
+ | ||
+LOCAL_SRC_FILES := src/lib/iconv.c \ | ||
+ src/libcharset/lib/localcharset.c \ | ||
+ src/lib/relocatable.c | ||
+ | ||
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/src/include \ | ||
+ $(LOCAL_PATH)/src/libcharset \ | ||
+ $(LOCAL_PATH)/src/libcharset/include | ||
+ | ||
+LOCAL_CFLAGS := \ | ||
+ -DLIBDIR="\"c\"" \ | ||
+ -D_ANDROID \ | ||
+ -DBUILDING_LIBCHARSET \ | ||
+ -DBUILDING_LIBICONV \ | ||
+ -DBUILDING_LIBICONV \ | ||
+ -DIN_LIBRARY | ||
+ | ||
+LOCAL_MODULE:= iconv | ||
+ | ||
+$(info Configuring iconv...) | ||
+COMMAND := $(shell \ | ||
+ export PATH=$(TOOLCHAIN_INSTALL_DIR)/bin:$$PATH; \ | ||
+ cd $(LOCAL_PATH); \ | ||
+ make distclean; \ | ||
+ ./configure --host="arm-linux-androideabi") | ||
+$(info iconv configured.) | ||
+ | ||
+include $(BUILD_STATIC_LIBRARY) | ||
+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- a/srclib/stdio.in.h 2011-08-07 15:42:06.000000000 +0200 | ||
+++ b/srclib/stdio.in.h 2015-06-10 09:27:58.129056262 +0200 | ||
@@ -695,7 +696,8 @@ _GL_CXXALIASWARN (gets); | ||
/* It is very rare that the developer ever has full control of stdin, | ||
so any use of gets warrants an unconditional warning. Assume it is | ||
always declared, since it is required by C89. */ | ||
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); | ||
+/*_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");*/ | ||
+#define gets(a) fgets( a, sizeof(*(a)), stdin) | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.