Skip to content

Commit

Permalink
fix handling of utf8 in output/error paths (ios-control#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ukalnins authored Sep 1, 2020
1 parent e722929 commit ee3aec1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ios-deploy/ios-deploy.m
Original file line number Diff line number Diff line change
Expand Up @@ -882,15 +882,15 @@ void write_lldb_prep_cmds(AMDeviceRef device, CFURLRef disk_app_url) {
range.length = CFStringGetLength(cmds);

if (output_path) {
CFStringRef output_path_str = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), output_path);
CFStringRef output_path_str = CFStringCreateWithCString(NULL, output_path, kCFStringEncodingUTF8);
CFStringFindAndReplace(cmds, CFSTR("{output_path}"), output_path_str, range, 0);
CFRelease(output_path_str);
} else {
CFStringFindAndReplace(cmds, CFSTR("{output_path}"), CFSTR(""), range, 0);
}
range.length = CFStringGetLength(cmds);
if (error_path) {
CFStringRef error_path_str = CFStringCreateWithFormat(NULL, NULL, CFSTR("%s"), error_path);
CFStringRef error_path_str = CFStringCreateWithCString(NULL, error_path, kCFStringEncodingUTF8);
CFStringFindAndReplace(cmds, CFSTR("{error_path}"), error_path_str, range, 0);
CFRelease(error_path_str);
} else {
Expand Down

0 comments on commit ee3aec1

Please sign in to comment.