64KB limit in passed in text for a service using NSTask
64KB limit in passed in text for a service using NSTask
- Subject: 64KB limit in passed in text for a service using NSTask
- From: Ron Fleckner <email@hidden>
- Date: Fri, 20 Aug 2010 13:00:06 +1000
Hi,
I'm developing a stand alone text service for changing/fixing case. For the simple cases of uppercasing and lowercasing I've simply used NSString's built in methods. But to correct sentence case, where the original text may have lowercase letters following full stops (period in American?) I've been using an NSTask to run a perl script which lives in my app package. That script also looks after other things such as a lone lowercase 'i' which should probably by 'I'. It works very well until the input text is greater than 64KB at which point an alert will appear in the service-using process, TextEdit in my testing so far, saying either that the service didn't send back the expected text in time or that the service didn't respond. After that, all the other services vended by my service are also cactus.
I'm not sure how or if I can get around this 64KB limit. I've tried various things like breaking the text up into smaller pieces if it's over 64KB and feeding those bits to the task, but so far without success.
I'm currently looking at RegexKitLite, but that (or the ICU library it uses) doesn't seem to support the kind of replacement tricks you get in PCRE. Specifically, in PCRE (PerlCompatibleRegularExpressions) you can do \u$1 to replace found match 1 with it's uppercased version which is very convenient.
Thanks in advance,
Ron
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden