From 8af793fccb7cd4683f9429fbecd64f956188451a Mon Sep 17 00:00:00 2001 From: Taner Sener Date: Mon, 9 Mar 2020 20:30:25 +0000 Subject: [PATCH] fix parsing of unicode parameters on ios/tvos, fixes #360 --- ios/src/MobileFFmpeg.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/src/MobileFFmpeg.m b/ios/src/MobileFFmpeg.m index cdb78681d..2ccfd662a 100644 --- a/ios/src/MobileFFmpeg.m +++ b/ios/src/MobileFFmpeg.m @@ -128,11 +128,11 @@ + (NSArray*)parseArguments: (NSString*)command { } else { previousChar = 0; } - char currentChar = [command characterAtIndex:i]; + unichar currentChar = [command characterAtIndex:i]; if (currentChar == ' ') { if (singleQuoteStarted || doubleQuoteStarted) { - [currentArgument appendFormat: @"%c", currentChar]; + [currentArgument appendFormat: @"%C", currentChar]; } else if ([currentArgument length] > 0) { [argumentArray addObject: currentArgument]; currentArgument = [[NSMutableString alloc] init]; @@ -141,7 +141,7 @@ + (NSArray*)parseArguments: (NSString*)command { if (singleQuoteStarted) { singleQuoteStarted = false; } else if (doubleQuoteStarted) { - [currentArgument appendFormat: @"%c", currentChar]; + [currentArgument appendFormat: @"%C", currentChar]; } else { singleQuoteStarted = true; } @@ -149,12 +149,12 @@ + (NSArray*)parseArguments: (NSString*)command { if (doubleQuoteStarted) { doubleQuoteStarted = false; } else if (singleQuoteStarted) { - [currentArgument appendFormat: @"%c", currentChar]; + [currentArgument appendFormat: @"%C", currentChar]; } else { doubleQuoteStarted = true; } } else { - [currentArgument appendFormat: @"%c", currentChar]; + [currentArgument appendFormat: @"%C", currentChar]; } }