2012-08-04 3 views
0

iTunes에서 현재 재생중인 아티스트의 이름을 반환하는 AppleScript가 있습니다. 불행히도 아티스트 이름에 ú와 같은 특수 문자가 포함되어 있으면 기괴한 문자가 출력됩니다. 이 문제를 어떻게 해결할 수 있습니까?AppleScript 출력의 이상한 문자

tell application "iTunes" 
    if player state is playing then 
     try 
      set myTrack to artist of current track 
     on error 
      return "" 
     end try 
     return myTrack 
    end if 
end tell 

답변

0

유니 코드 문자는 일반적으로 문제가 발생하지 않아야 일부 파일의

tell application "iTunes" to tell current track 
    set name to "あ" 
    name -- あ 
end tell 

로, ID3 태그는 아마 비 유니 코드 인코딩을해야합니다. AppleScript에서 처리하는 방법을 모르지만 태그를 UTF-8로 변환 해 볼 수 있습니까? https://superuser.com/questions/90449/repair-encoding-of-id3-tags 또는 http://code.google.com/p/id3-to-unicode/을 참조하십시오.

+0

UTF-8 Apple의 기본값이 아닙니까? iTunes의 ID3 필드 상자에 키보드에서 ú를 직접 입력해도 문제는 계속됩니다. – Zade