Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 77707e5

Browse files
committed
Merge remote-tracking branch 'upstream/develop-8.2' into merge-develop-8.2-04.10.2017
2 parents a5951bd + d0675b6 commit 77707e5

File tree

9 files changed

+55
-11
lines changed

9 files changed

+55
-11
lines changed

config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,6 @@ def guess_xcode_arch(target_sdk):
203203
if sdk == 'iphoneos':
204204
if int(ver) < 8:
205205
return 'armv7'
206-
elif int(ver) >= 11:
207-
return 'arm64'
208206
else:
209207
return 'armv7 arm64'
210208
if sdk == 'iphonesimulator':

docs/dictionary/keyword/private.lcdoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Whenever an implicit handler call is made (ie calling the handler
4040
simply by its name as opposed to using send or call), LiveCode will
4141
check the current script for a private handler before allowing the call
4242
to pass through the message path. If a private handler is found in the
43-
curent script, it will be directly called.
43+
current script, it will be directly called.
4444

4545
> *Note:* Attempting to compile a private handler containing a <pass>
4646
control structure will cause a compilation error because private

docs/dictionary/property/revProfile.lcdoc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
Name: revProfile
22

3-
Synonyms: crevgeneral[&quot;profile&quot;], profile
4-
53
Type: property
64

75
Syntax: set the revProfile of <object> to <profileName>
@@ -66,7 +64,7 @@ cRevGeneral["profile"].)
6664
>*Note:* When included in a standalone application, the Profile library
6765
> is implemented as a hidden group and made available when the group
6866
> receives its first openBackground message. During the first part of
69-
> the applicati startup process, before this message is sent, the
67+
> the application startup process, before this message is sent, the
7068
> <revProfile> property is not yet available. This may affect attempts
7169
> to use this property in startup, preOpenStack, openStack, or
7270
> preOpenCard hand in the main stack. Once the application has finished

docs/notes/bugfix-13857.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Correct dictionary entry for revProfile

docs/notes/bugfix-19609.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Make sure unicode characters display correctly when set htmlText in browser

engine/src/mblandroidjava.cpp

Lines changed: 48 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
2121
#include "parsedef.h"
2222
#include "exec.h"
2323

24-
25-
2624
#include "mblandroidjava.h"
2725

2826
#include <jni.h>
@@ -500,6 +498,38 @@ bool MCJavaStringFromNative(JNIEnv *env, const char *p_string, jstring &r_java_s
500498
}
501499
}
502500

501+
bool MCJavaStringFromUTF8(JNIEnv *env, const char *p_string, jstring &r_java_string)
502+
{
503+
if (p_string == nil)
504+
{
505+
r_java_string = nil;
506+
return true;
507+
}
508+
509+
/* The JNI NewStringUTF function expected Modified UTF-8 which encodes NUL
510+
* as two bytes, and SMP chars as two surrogates. This differs from the
511+
* encoding of p_string, which is standard UTF-8. Therefore, we convert
512+
* p_string to UTF-16, and then use NewString instead. */
513+
514+
/* Create a StringRef from the UTF-8, which does the necessary conversion
515+
* to UTF-16. */
516+
MCAutoStringRef t_string;
517+
if (!MCStringCreateWithBytes((const char_t *)p_string, strlen(p_string), kMCStringEncodingUTF8, false, &t_string))
518+
{
519+
return false;
520+
}
521+
522+
/* Now lock the content of the stringref as UTF-16 so we can pass the buffer
523+
* and length to the JNI function. */
524+
MCAutoStringRefAsUTF16String t_utf16_string;
525+
if (!t_utf16_string.Lock(*t_string))
526+
{
527+
return false;
528+
}
529+
530+
return nil != (r_java_string = env->NewString(t_utf16_string.Ptr(), t_utf16_string.Size()));
531+
}
532+
503533
bool MCJavaStringFromUnicode(JNIEnv *env, const MCString *p_string, jstring &r_java_string)
504534
{
505535
if (p_string == nil)
@@ -1403,6 +1433,8 @@ static MCJavaType native_sigchar_to_returntype(char p_sigchar)
14031433
return kMCJavaTypeVoid;
14041434
case 's':
14051435
return kMCJavaTypeCString;
1436+
case 't':
1437+
return kMCJavaTypeUtf8CString;
14061438
case 'S':
14071439
return kMCJavaTypeMCString;
14081440
case 'U':
@@ -1448,6 +1480,7 @@ static const char *return_type_to_java_sig(MCJavaType p_type)
14481480
case kMCJavaTypeBoolean: // boolean
14491481
return "Z";
14501482
case kMCJavaTypeCString: // string from char *
1483+
case kMCJavaTypeUtf8CString: // string from utf8 char *
14511484
case kMCJavaTypeMCString: // string from MCString *
14521485
case kMCJavaTypeMCStringUnicode: // string from utf16 MCString *
14531486
case kMCJavaTypeMCStringRef: // string from MCStringRef
@@ -1701,11 +1734,23 @@ bool MCJavaConvertParameters(JNIEnv *env, const char *p_signature, va_list p_arg
17011734
case kMCJavaTypeCString:
17021735
{
17031736
t_cstring = va_arg(p_args, const char *);
1704-
1737+
17051738
t_success = MCJavaStringFromNative(env, t_cstring, t_java_string);
17061739
if (t_success)
17071740
t_value . l = t_java_string;
17081741

1742+
t_delete = true;
1743+
t_object = true;
1744+
}
1745+
break;
1746+
case kMCJavaTypeUtf8CString:
1747+
{
1748+
t_cstring = va_arg(p_args, const char *);
1749+
1750+
t_success = MCJavaStringFromUTF8(env, t_cstring, t_java_string);
1751+
if (t_success)
1752+
t_value . l = t_java_string;
1753+
17091754
t_delete = true;
17101755
t_object = true;
17111756
}

engine/src/mblandroidjava.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ typedef enum
4040

4141
// specialized return types
4242
kMCJavaTypeCString,
43+
kMCJavaTypeUtf8CString,
4344
kMCJavaTypeMCString,
4445
kMCJavaTypeMCStringUnicode,
4546
kMCJavaTypeMCStringRef,

ide-support/revsaveasiosstandalone.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ private command revSaveAsMobileStandaloneMain pStack, pAppBundle, pTarget, pSett
402402
if tRawArchs contains "ARM64" and not pSettings["ios,32-bit only"] then
403403
put "arm64 " after tArchs
404404
end if
405-
if tRawArchs contains "V7" then
405+
if tRawArchs contains "V7" and pSettings["ios,minimum version"] < 11.0 then
406406
put "armv7 " after tArchs
407407
end if
408408

libbrowser/src/libbrowser_android.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,7 @@ class MCAndroidWebViewBrowser : public MCBrowserBase
793793

794794
bool SetHTMLText(const char *p_utf8_string)
795795
{
796-
MCAndroidObjectRemoteCall(m_view, "loadHtml", "vss", nil, LIBBROWSER_DUMMY_URL, p_utf8_string);
796+
MCAndroidObjectRemoteCall(m_view, "loadHtml", "vst", nil, LIBBROWSER_DUMMY_URL, p_utf8_string);
797797
return true;
798798
}
799799

0 commit comments

Comments
 (0)