#16
|
||||
|
||||
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 |
#17
|
|||
|
|||
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 ----------------- |
#18
|
||||
|
||||
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 |
#19
|
|||
|
|||
"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 "/" ----------------- |
#20
|
||||
|
||||
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 |
#21
|
|||
|
|||
> 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 ------------------------ |
#22
|
||||
|
||||
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 |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | Rate This Thread |
|
|