• 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: For some strange reason
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: For some strange reason


  • Subject: Re: For some strange reason
  • From: "Mark J. Reed" <email@hidden>
  • Date: Fri, 20 May 2011 10:15:26 -0400

On Fri, May 20, 2011 at 9:21 AM, Christopher Stone <email@hidden> wrote:
I think it likely too that Perl, Python, and Ruby can handle case changes with some alacrity.

Generally, but you have to be explicit about wanting Unicode support:

    set upVar to (do shell script "perl -Mencoding=utf8 -pe '$_ = uc $_' <<<" & (quoted form of myVar))

    set upVar to (do shell script "python -c 'import sys; print unicode(sys.stdin.read(), encoding="utf-8").upper()' <<<" & (quoted form of myVar))

The default Ruby 1.8 install on OS X doesn't actually support Unicode case conversion at all, but if you install the unicode gem then this will work:

    set upVar to (do shell script "ruby -rubygems -ne 'require "unicode"; puts Unicode.upcase $_' <<<" & (quoted form of myVar))



 

--
Best Regards,
Chris


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden




--
Mark J. Reed <email@hidden>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: For some strange reason (From: Shane Stanley <email@hidden>)
 >Re: For some strange reason (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: For some strange reason
  • Next by Date: Re: XML text to Record
  • Previous by thread: Re: For some strange reason
  • Next by thread: XML text to Record
  • Index(es):
    • Date
    • Thread