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

Commit de2d5ab

Browse files
[[ Bug 13827 ]] Use UTF-8 strings when building iOS externals
1 parent 73d2e7e commit de2d5ab

File tree

4 files changed

+11
-8
lines changed

4 files changed

+11
-8
lines changed

docs/notes/bugfix-13827.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Can't use double-byte characters for a standalone name

ide-support/revdeploylibraryios.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ command deployDo pTargetStack, pSimulator, pAppBundle
185185

186186
put empty into sDeploySimulationStatus
187187
try
188-
revIPhoneLaunchAppInSimulator tTempAppBundle, tFamily, "revIDEDeployIOSLaunchCallback"
188+
revIPhoneLaunchAppInSimulator textEncode(tTempAppBundle, "utf-8"), tFamily, "revIDEDeployIOSLaunchCallback"
189189
catch tException
190190
end try
191191

ide-support/revsaveasiosstandalone.livecodescript

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1246,10 +1246,11 @@ private command revCreateMobilePlist pSettings, pAppBundle, pTarget, pFonts
12461246

12471247
local tPlist
12481248
put url ("file:" & tTemplateFile) into tPlist
1249-
replace "${EXECUTABLE_NAME}" with tExeName in tPlist
1250-
replace "${BUNDLE_IDENTIFIER}" with tBundleId in tPlist
1249+
// SN-2014-10-27: [[ Bug 13827 ]] Strings in a Plist file should be UTF-8 encoded
1250+
replace "${EXECUTABLE_NAME}" with textEncode(tExeName, "utf-8") in tPlist
1251+
replace "${BUNDLE_IDENTIFIER}" with textEncode(tBundleId, "utf-8") in tPlist
12511252
replace "${BUNDLE_VERSION}" with tBundleVersion in tPlist
1252-
replace "${BUNDLE_DISPLAY_NAME_SUPPORT}" with "<string>" & tDisplayName & "</string>" in tPlist
1253+
replace "${BUNDLE_DISPLAY_NAME_SUPPORT}" with "<string>" & textEncode(tDisplayName, "utf-8") & "</string>" in tPlist
12531254
replace "${MINIMUM_OS_SUPPORT}" with "<string>" & tMinimumOS & "</string>" in tPlist
12541255
replace "${CUSTOM_FONTS}" with tCustomFonts in tPlist
12551256

revmobile/src/reviphone.mm

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,10 @@ bool revIPhoneLaunchAppInSimulator(MCVariableRef *argv, uint32_t argc, MCVariabl
494494
t_success = Throw("simulator already running");
495495

496496
// Fetch the app path
497-
const char *t_app;
498-
t_app = nil;
497+
MCString t_app;
499498
if (t_success)
500-
t_success = CheckError(MCVariableFetch(argv[0], kMCOptionAsCString, &t_app));
499+
// SN-2014-10-28: [[ Bug 13827 ]] Fetch the string as an MCString (to allow UTF-8 characters)
500+
t_success = CheckError(MCVariableFetch(argv[0], kMCOptionAsString, &t_app));
501501

502502
// Fetch the family string
503503
const char *t_family;
@@ -533,7 +533,8 @@ bool revIPhoneLaunchAppInSimulator(MCVariableRef *argv, uint32_t argc, MCVariabl
533533
[t_delegate setMessage: t_callback];
534534
[t_delegate setTarget: t_target];
535535

536-
t_app_spec = [s_simulator_proxy specifierWithApplicationPath: [NSString stringWithCString:t_app encoding: NSMacOSRomanStringEncoding]];
536+
// SN-2014-10-27: [[ Bug 13827 ]] We need to pass the parameter as a UTF-8 string
537+
t_app_spec = [s_simulator_proxy specifierWithApplicationPath: [NSString stringWithUTF8String:t_app.buffer]];
537538

538539
t_session_config = [s_simulator_proxy newSessionConfig];
539540

0 commit comments

Comments
 (0)