AppleScript名:ICUTransformのサンプル v2 |
–Sample Code — Created 2015-01-06 by Takaaki Naganoya use AppleScript version "2.4" use scripting additions use framework "Foundation" use bPlus : script "BridgePlus" –https://www.macosxautomation.com/applescript/apps/BridgePlus.html set theString to "ながのや, たかあき" –Hiragana set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Hiragana-Latin" inverse:false) as text –> "naganoya, takaaki" set theString to "ながのや, たかあき" –Hiragana set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Hiragana-Katakana" inverse:false) as text –> "ナガノヤ, タカアキ"–Katakana set theString to "Takaaki, Naganoya" set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Latin-Hiragana" inverse:false) as text –> "たかあき、 ながのや"–Hiragana set theString to "Takaaki, Naganoya" set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Latin-Katakana" inverse:false) as text –> "タカアキ、 ナガノヤ"–Katakana set theString to "Shane, Stanley" set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Latin-Katakana" inverse:false) as text –> "シャネ、 スタンレイ"–Katakana…..this seems odd. "シェーン, スタンリー" will be a right spelling set theString to "Takaaki, Naganoya" set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Halfwidth-Fullwidth" inverse:false) as text –> "Takaaki, Naganoya"–Double Width Alphabet set theString to "Naganoya, Takaaki" set aRes to (bPlus’s transformedFrom:theString ICUTransform:"Latin-Hangul" inverse:false) as text –> "나가노야, 타카아키"–Hangul |
More from my site
(Visited 75 times, 1 visits today)