Re: NSTask and unicode arguments
Re: NSTask and unicode arguments
- Subject: Re: NSTask and unicode arguments
- From: Stefan Fisk <email@hidden>
- Date: Sun, 6 Nov 2005 12:32:00 +0100
Actually, that doesn't work at all. If i use Unicode::Normalize::NFC
()/NFKC() the string doesn't change whatsoever, if i use NFD()/NFKD()
it turns into invalid unicode, which leads me to think that
fileSystemRepresentation doesn't return utf-8 strings.
The question still remains though: is it possible to pass unicode
strings as arguments to NSTask? The only idea i can come up with now
is to subclass NSString and override fileSystemRepresentation, but
I'd really rather not use such hacks.
6 nov 2005 kl. 04.21 skrev Aki Inoue:
Stefan,
You can use Unicode::Normalize to precompose before sending to the
website.
Aki
Dear Cocoa-dev,
I've got a perl script that mines some data of web pages and
prints its result to stdout. This script in turn is called from an
application, using NSTask. My problem is that when i give it
argument string with unicode characters in them they get
decomposed, so that ö becomes ö etc. The web pages in
question don't support decomposed characters, so ö has to become %
c3¶. Right now i can't figure out how to work around this, and
any creative suggestions would be appreciated. The real culprit is
-[NSString fileSystemRepresentation], which NSTask uses when
passing its arguments to the script.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden