Shirt Pocket Discussions

Shirt Pocket Discussions (https://www.shirt-pocket.com/forums/index.php)
-   General (https://www.shirt-pocket.com/forums/forumdisplay.php?f=6)
-   -   Scheduled Copies doesn' work in Japanese Language mode. (https://www.shirt-pocket.com/forums/showthread.php?t=1704)

ichiro 10-12-2006 05:13 AM

Scheduled Copies doesn' work in Japanese Language mode.
 
I am using SD in the Japanese Language mode.
(System Prefernces -> Internationl -> Languages -> ???(Japanese))

Scheduled Copies doesn't work in Japanese Language mode.

I tried with Terminal.

-------------------------
$ crontab -l

30 21 * * 1,2,3,4,5 open file:///Users/ichiro/Library/Application\%20Support/SuperDuper\%21/Scheduled\%20Copies/Smart\%20Update\%20Frog_HD_ichiro\%20from\%20Frog\ %20HD.sdsp/Copy\%20Job.app

$ open file:///Users/ichiro/Library/Application\%20Support/SuperDuper\%21/Scheduled\%20Copies/Smart\%20Update\%20Frog_HD_ichiro\%20from\%20Frog\ %20HD.sdsp/Copy\%20Job.app
-------------------------

SD did not start.

However,It worked in English Language mode.
(System Prefernces -> Internationl -> Languages -> English)

Is there a way of making Scheduled Copies work in Japanese Language mode?

-----------------------------
Mac mini PPC
Mac OS X 10.4.8 Japanese

dnanian 10-12-2006 09:39 AM

That's strange, Ichiro: we have a large number of Japanese language users and have only run into a single problem (which had to do with "back slashes" under 10.3.9).

On top of that, your drive names certainly aren't unusual at all, and have no Japanese characters in them.

Do you get any sort of error? Will SuperDuper! launch if you just try with AppleScript?

ichiro 10-12-2006 01:25 PM

> Will SuperDuper! launch if you just try with AppleScript?
I tried Applescript in the Japanese Language mode.

/Users/ichiro/Library/Application Support/SuperDuper!/Scheduled Copies/Smart Update Frog_HD_ichiro from Frog HD.sdsp/Copy Job.applescript

1. I open "Copy Job.applescript" with ScriptEditor.
2. I click the ScriptEditor's compile button.
3. I click the ScriptEditor's run button.
4. SD! starts up.
5. Script stops in the following places.

read theSettingsFile

-----------------------------------------------
set theSettingsFile to POSIX file sessionSettingFile
open for access theSettingsFile
set mySettings to read theSettingsFile
close access theSettingsFile
----------------------------------------------

This Script was the same result in the English mode.

However,"Copy Job.app" worked with English mode without trouble.
"Copy Job.app" doesn't work in the Japanese mode.

dnanian 10-12-2006 04:49 PM

And you get no errors in the Console, ichiro?

ichiro 10-13-2006 12:33 PM

> 5. Script stops in the following places.
AppleScript Editor's Error Message.

---------------------
AppleScript Error
End of file error.
---------------------

event log window
----------------------------
tell application "SuperDuper!"
get status
idle
end tell
tell current application
open for access file "Frog HD:Applications:AppleScript:Session Settings.sdss"
78
read file "Frog HD:Applications:AppleScript:Session Settings.sdss"
open for access file "Frog HD:Applications:AppleScript:Session Settings.sdss"
79
read file "Frog HD:Applications:AppleScript:Session Settings.sdss"
-----------------------------------------

dnanian 10-13-2006 03:53 PM

Right; that's failing because "path to me" doesn't work when running the script in the script editor. The real question is whether or not we can launch and run SuperDuper! when in Japanese mode.

So, what I'd suggest is -- in Terminal, in Japanese mode, with SuperDuper! not running -- running the following:

Code:

osascript
tell application "SuperDuper!" to launch

Then press Control-d. That *should* launch SuperDuper. Does it?

ichiro 10-14-2006 02:50 AM

I tried osascript in Terminal,in Japanese mode.
SuperDuper! was launched.

dnanian 10-14-2006 09:38 AM

OK. Please open the Console application and clear it. Then, try to run the Copy Job application (in its normal location, with "open").

Send me anything that appears in the system.log or console.log...

ichiro 10-17-2006 10:18 AM

I tried to run Copy Job application in English mode.
SD! worked with English mode without trouble.

Command in Terminal
-----------------------
$ open file:///Users/ichiro/Library/Application\%20Support/SuperDuper\%21/Scheduled\%20Copies/Copy\%20Newer\%20files\%20from\%20Frog\%20HD\%20to \%20BackupImage01.sdsp/Copy\%20Job.app
-----------------------

syslog
-----------------------------
Oct 17 22:48:20 mac-mini KernelEventAgent[32] <Notice>: tid 00000000 received unknown event (256)
Oct 17 22:48:20 mac-mini sudo <Notice>: root : TTY=unknown ; PWD=/ ; USER=ichiro ; COMMAND=/usr/bin/hdiutil create -size 102264.06m -fs HFS+J -type SPARSE -volname BackupImage01 -ov /Users/Shared/BackupImage01.sparseimage
Oct 17 22:48:26 mac-mini sudo <Notice>: root : TTY=unknown ; PWD=/ ; USER=ichiro ; COMMAND=/bin/chmod 0664 /Users/Shared/BackupImage01.sparseimage
Oct 17 22:48:28 mac-mini sudo <Notice>: root : TTY=unknown ; PWD=/ ; USER=ichiro ; COMMAND=/bin/echo /dev/disk3s2
Oct 17 22:48:28 mac-mini KernelEventAgent[32] <Notice>: tid 00000000 received unknown event (256)
-------------------------

However,"Copy Job.app" doesn't work in the Japanese mode.
SD was no reaction.
SD dosen't launch.
Nothing was recorded in syslog.

dnanian 10-17-2006 11:52 AM

To other forum members: are any other Japanese users experiencing this problem?

ichiro 10-20-2006 11:45 PM

I found an improvement method of a trouble.

I referred to a page of here.
http://www.shirt-pocket.com/blog/ind...t_japan_style/

Japanese tiger systems need ASCII 128 as backslash.

I changed the following file.
/Applications/SuperDuper!.app/Contents/Resources/Copy Job Script.template

-------------------------------------
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
set backslashChar to ASCII character 128
-------------------------------------

-------------------------------------
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
set backslashChar to ASCII character 128
-------------------------------------

SuperDuper! worked with Japanese mode without trouble.

ichiro 10-21-2006 12:18 AM

SuperDuper! Schedule worked with Japanese mode without trouble by this patch.
However, SuperDuper! Schedule did not work with english mode by this patch.

dnanian 10-21-2006 09:11 AM

Interesting. I'd verified the fix I made with a user in Japan (who originally reported the problem), and it worked for him.

In addition, the fix in the blog post should only be required for Panther -- Tiger should be working fine with backslash!

OK -- I'm going to have to try to come up with a technique that will detect this problem. I'm not sure what it is right now, so please stand by, and thanks for the additional information.

dnanian 10-21-2006 10:09 AM

OK. Let's try this.

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:

Code:

        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

Let me know if that works for both English and Japanese modes.

ichiro 10-22-2006 04:34 AM

I tried code.
SD! did not work with English mode and Japanese mode.

applescript-A
----------------
set A to (user locale of (system info)) as string
------------
I trid this applescript-A with English mode and Japanese mode.
For the result, both were "ja_JP".

applescript-B
---------
set B to characters 1 thru 2 of (user locale of (system info)) as string
---------
I trid this applescript-B with English mode and Japanese mode.
For the result, both were "j/a".

It is a /(slash) without knowing why.
It may be the problem of a ScriptEditor.app.

dnanian 10-22-2006 10:17 AM

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?

ichiro 10-23-2006 09:59 AM

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
-----------------

dnanian 10-23-2006 10:47 AM

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...

ichiro 10-24-2006 06:13 AM

"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 "/"
-----------------

dnanian 10-24-2006 10:22 AM

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?

ichiro 10-28-2006 08:52 AM

> 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
------------------------

dnanian 10-28-2006 10:11 AM

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).


All times are GMT -4. The time now is 08:11 PM.

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