Shirt Pocket Discussions  
    Home netTunes launchTunes SuperDuper! Buy Now Support Discussions About Shirt Pocket    

Go Back   Shirt Pocket Discussions > SuperDuper! > General

Reply
 
Thread Tools Rate Thread Display Modes
  #16  
Old 10-22-2006, 10:17 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
That's weird -- I'm helping another user who's having the same problem and the script worked for him in English but not in Japanese. I don't understand why, in English mode, the locale would be Japanese, though you might have to log out and back in to switch locales, or at least quit the application... did you try that?
__________________
--Dave Nanian
Reply With Quote
  #17  
Old 10-23-2006, 09:59 AM
ichiro ichiro is offline
Registered User
 
Join Date: Oct 2006
Posts: 11
I checked System Preferences again.

I obtained the user locale result "en_US" by the following setup.

System Preferences -> International -> Formats
Reagion: United States

SuperDuper! worked with Japanese and English mode without trouble by the following code.
-----------------
tell application "System Events"
set sysInfo to system info

if (characters 1 thru 2 of (user locale of sysInfo)) as string = "j/a" then
set backslashChar to ASCII character 128
else
set backslashChar to ASCII character 92
end if
end tell
-----------------
Reply With Quote
  #18  
Old 10-23-2006, 10:47 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Hm. OK -- so, the language choice doesn't change the locale, but the "format" menu does. That doesn't help us much, unforutnately -- and I don't see how the first two characters of ja_JP can be equal to three characters ("j/a").

I'm going to see if I can come up with an alternate approach with Unicode...
__________________
--Dave Nanian
Reply With Quote
  #19  
Old 10-24-2006, 06:13 AM
ichiro ichiro is offline
Registered User
 
Join Date: Oct 2006
Posts: 11
"j/a"
Probably the cause of slash may be Code of the following.

/Applications/SuperDuper!.app/Contents/Resources/Copy Job Script.template
-----------------
set the text item delimiters to "/"
-----------------
Reply With Quote
  #20  
Old 10-24-2006, 10:22 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Ah! Yes, that would explain it: I don't have that in my example (since it's not at the top of on run, where I indicate the code should go).

So, if you move it to the top of "on run", does it then work?
__________________
--Dave Nanian
Reply With Quote
  #21  
Old 10-28-2006, 08:52 AM
ichiro ichiro is offline
Registered User
 
Join Date: Oct 2006
Posts: 11
> Under the comment about Japanese backslashes at the top, put the following:
> global backslashChar
> Delete the declaration of backslashChar in the two encode routines.
> At the start of on run (lower down), please put:

I did not understand the above explanation.
I challenged again.
SuperDuper! schedule worked with both Japanese and English mode without trouble by the following fix.


fix-01
------------------------
-- of the backslash character in the Japanese OSX environment under Panther. Backslash and the Yen symbol are the
-- same ASCII code, but the script compiler doesn't handle it properly, and the following characters
-- are not escaped.

global backslashChar
------------------------


fix-02
------------------------
on encode_char(this_char)
set the ASCII_num to (the ASCII number this_char)
set the hex_list to {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F"}
-- set backslashChar to ASCII character 92
------------------------


fix-03
------------------------
on encode_text(this_text, encode_URL_A, encode_URL_B)
set the standard_characters to "abcdefghijklmnopqrstuvwxyz0123456789"
set quoteChar to ASCII character 34
-- set backslashChar to ASCII character 92
------------------------


fix-04
------------------------
on run {}
tell application "System Events"
set sysInfo to system info
if (characters 1 thru 2 of (user locale of sysInfo)) as string = "ja" then
set backslashChar to ASCII character 128
else
set backslashChar to ASCII character 92
end if
end tell
------------------------
Reply With Quote
  #22  
Old 10-28-2006, 10:11 AM
dnanian's Avatar
dnanian dnanian is offline
Administrator
 
Join Date: Apr 2001
Location: Weston, MA
Posts: 14,923
Send a message via AIM to dnanian
Yes, that's basically what I did -- I must not have communicated it well above.

Anyway, yes, it works... except "system info" isn't available in 10.3.9, so it's not going to work for those users (and without those users, you can actually use a real backslash character).

Still trying to come up with something that will work for all. I might have to abandon the attempt to work under 10.3.9 for Japanese users (without editing the template).
__________________
--Dave Nanian
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:15 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.