• 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: Init Caps Handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Init Caps Handler


  • Subject: Re: Init Caps Handler
  • From: Philip Aker <email@hidden>
  • Date: Tue, 20 Nov 2007 17:41:08 -0800

On 2007-11-20, at 16:51, Takaaki Naganoya wrote:

set elan to "élAn"
set upper to (do shell script "echo 'puts [string toupper {" & elan & "}]' | tclsh")
set lower to (do shell script "echo 'puts [string tolower {" & upper & "}]' | tclsh")
set title to (do shell script "echo 'puts [string totitle {" & upper & "}]' | tclsh")
set res to upper & space & lower & space & title

--> "ÉLAN élan Élan"


--> "四AN 四an 四an" (in Tiger Japanese environment)

I suspect that the default locale settings might be different on a Japanese system but don't know for sure. This could happen either with tclsh or in do shell script. I'm running this on Tiger and have not checked on Leopard.

set stdin to (do shell script "echo 'puts [fconfigure stdin]' | tclsh")
set stdout to (do shell script "echo 'puts [fconfigure stdout]' | tclsh")
set stderr to (do shell script "echo 'puts [fconfigure stderr]' | tclsh")
stdin & return & stdout & return & stderr

(*
"-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} -translation auto
-blocking 1 -buffering line -buffersize 4096 -encoding utf-8 -eofchar {} -translation lf
-blocking 1 -buffering none -buffersize 4096 -encoding utf-8 -eofchar {} -translation lf"
*)


Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@



 _______________________________________________
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: 
 >Init Caps Handler (From: Oakley Masten <email@hidden>)
 >Re: Init Caps Handler (From: Paul Scott <email@hidden>)
 >Re: Init Caps Handler (From: Philip Aker <email@hidden>)
 >Re: Init Caps Handler (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: Processing RSS feeds in Mail.app?
  • Next by Date: Re: Folder Actions
  • Previous by thread: Re: Init Caps Handler
  • Next by thread: Re: Init Caps Handler
  • Index(es):
    • Date
    • Thread