> staf local var resolve string {STAF/Config/CodePage}
Response
IBM-1252
The problem: STAF COPY fails if directory or file has japanese characters
> staf local fs copy directory c:\l10ntest\JPN todirectory c:\l10ntest\out recurse
Error submitting request, RC: 51
Additional info
---------------
Name RC OS RC
------------------------ -- ------
C:\l10ntest\JPN\????.txt 17 <None>
What version of STAF are you running on this system?
STAF local MISC VERSION
Does the STAF FS service's MOVE DIRECTORY and MOVE FILE requests work for this directory? Note these commands moves (renames) directories/files instead of copying them. For example:
STAF local FS MOVE DIRECTORY c:\l10ntest\JPN TODIRECTORY c:\l10ntest\out
STAF local FS MOVE FILE c:\110ntest\JPN\fileWithJapaneseChars TODIRECTORY c:\110ntest\out
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it appears to be a bug. You can open a bug on SourceForge.
If you are just copying a file from one place to the other on a machine (instead of from one machine to another), as a workaround you could use the STAF PROCESS service and submit a PROCESS START request to run the Windows "xcopy" or "copy" command. For example:
I am using Windows 7 having japanese language pack installed. Both ACP and OEMCP are 1252
> reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage /f ACP
ACP REG_SZ 1252
> reg query HKLM\SYSTEM\CurrentControlSet\Control\Nls\CodePage /f OEMCP
OEMCP REG_SZ 1252
> chcp
Active code page: 1252
> staf local var resolve string {STAF/Config/CodePage}
Response
IBM-1252
The problem: STAF COPY fails if directory or file has japanese characters
> staf local fs copy directory c:\l10ntest\JPN todirectory c:\l10ntest\out recurse
Error submitting request, RC: 51
Additional info
---------------
Name RC OS RC
------------------------ -- ------
C:\l10ntest\JPN\????.txt 17 <None>
Can someone help solving the problem?
Last edit: Sai 2014-06-28
What version of STAF are you running on this system?
Does the STAF FS service's MOVE DIRECTORY and MOVE FILE requests work for this directory? Note these commands moves (renames) directories/files instead of copying them. For example:
Hi Sharon,
The STAF version I am using is 3.4.17.
> STAF local MISC VERSION
Response
———
3.4.17
MOVE DIRECTORY and MOVE FILE works fine with japanese chars:
> staf local fs move directory c:\l10ntest\JPN todirectory c:\l10ntest\out
Response
———
1 dir(s) moved.
> staf local fs move file c:\l10ntest\JPN\パス表示.txt todirectory c:\l10ntest\out
Response
———
C:\l10ntest\JPN\????.txt
1 file(s) moved.
> staf local fs copy file c:\l10ntest\JPN\パス表示.txt todirectory c:\l10ntest\out
Error submitting request, RC: 17
Additional info
——————
C:\l10ntest\JPN\????.txt
Hi Sharon,
Is this an issue with STAF?
Thanks,
Sai
Yes, it appears to be a bug. You can open a bug on SourceForge.
If you are just copying a file from one place to the other on a machine (instead of from one machine to another), as a workaround you could use the STAF PROCESS service and submit a PROCESS START request to run the Windows "xcopy" or "copy" command. For example:
Hi Sharon,
Thanks for the inputs.
Actually, I need to copy directories from one machine to another and also across operating systems.