• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTask and unicode arguments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >NSTask and unicode arguments (From: Stefan Fisk <email@hidden>)
 >Re: NSTask and unicode arguments (From: Aki Inoue <email@hidden>)

  • Prev by Date: NSScrollView problems when scaling an NSTextView
  • Next by Date: NSBrowser with NSTreeController
  • Previous by thread: Re: NSTask and unicode arguments
  • Next by thread: Silly question. Is iTunes Cocoa application?
  • Index(es):
    • Date
    • Thread