RTB 11.5 - Check-in PDF file : gz error

Posted by atuldalvi123 on 01-Dec-2016 03:35

Hi,

I am trying to check-in a PDF (RTB 11.5 B)  but getting below error:

Do I need to do something within RTB ?

If you see the file name has a special character, is that the issue ?

---------------------------
Roundtable Object Check In (Press HELP to view stack trace)
---------------------------
Cannot check in PCODE Object 'dépandance.pdf'.

Repository operation canceled during file compression.
E:\doc\dépandance.pdf

Gzip compress failed.

E:\doc\dépandance.pdf.gz: No such file or directory

See rtb/p/rtb_compress to review the compression method.
---------------------------
OK   Help  
---------------------------

Posted by Jeff Ledbetter on 06-Dec-2016 15:43

The rtb_compress.p procedure is provided as source. You may want to try the solution mentioned in the kbase. Or, disable compression altogether. For further assistance, contact Roundtable Technical Support.

All Replies

Posted by atuldalvi123 on 05-Dec-2016 10:09

Hi Guys,

any update on this ?

Posted by Jeff Ledbetter on 05-Dec-2016 10:33

Gzip comes with the Roundtable windows client and server. If you are using Unix/Linux, you have to copy the gzip for your flavor in the 'gzip' directory. Please see the Roundtable Installation Guide.

You may want to contact Roundtable Technical Support:

http://www.roundtable-software.com/roundtable/support/

Posted by atuldalvi123 on 05-Dec-2016 10:42

I am using Round table windows client and serve. Check-in  is working for few PDF but not for the files having special characters in the name. for example dépandance.pdf

Is this related to the code page ? Where do we set the code page ?

Posted by Jeff Ledbetter on 05-Dec-2016 11:48

Our compression routine creates a bat file and runs it via OS-COMMAND (rtb_compress.p). There could be a codepage issue and the DOS shell.

This PSC kbase seems interesting:

"Due to known inconsistencies within the Progress ABL, Unicode/UTF-8 filename support isn't available through all ABL constructs.  Therefore it is not necessarily possible to rename or copy a filename that has Unicode characters.

For example, the OUTPUT TO command might correctly output to a UTF-8 filename but something like OS-RENAME or OS-COMMAND might not work."

knowledgebase.progress.com/.../P193105

Posted by atuldalvi123 on 06-Dec-2016 10:18

How do I check-in then a file having special character in the name like dépandance.pdf ?

Is there any alternative ?

Posted by atuldalvi123 on 06-Dec-2016 14:33

any update ?

Posted by Jeff Ledbetter on 06-Dec-2016 15:43

The rtb_compress.p procedure is provided as source. You may want to try the solution mentioned in the kbase. Or, disable compression altogether. For further assistance, contact Roundtable Technical Support.

Posted by Bo Haslund on 07-Dec-2016 11:34

You could try modifying rtp_compress.p by adding something like:

PROCEDURE ShellExecuteA EXTERNAL "shell32.dll":

 DEFINE  INPUT PARAMETER  hwnd          AS SHORT.

 DEFINE  INPUT PARAMETER  lpszOp        AS CHAR.

 DEFINE  INPUT PARAMETER  lpszFile      AS CHAR.

 DEFINE  INPUT PARAMETER  lpszParams    AS CHAR.

 DEFINE  INPUT PARAMETER  lpszDir       AS CHAR.

 DEFINE  INPUT PARAMETER  fsShowCmd     AS SHORT.

 DEFINE  RETURN PARAMETER err-num       AS SHORT.

END PROCEDURE.  /* --- ShellExecuteA --- */

FUNCTION RunCommand RETURNS INTEGER

 (INPUT pchCommand AS CHARACTER,

  INPUT pchParameters AS CHARACTER,

  INPUT pchDirectory AS CHARACTER,

  INPUT plgShow AS LOGICAL) :

/*------------------------------------------------------------------------------

 Purpose:  Windows specific version of OS-COMMAND. Supports UNC

   Notes:  Return value <= 32 indicates error

------------------------------------------------------------------------------*/

DEFINE VARIABLE iinResult AS INTEGER NO-UNDO.

  RUN ShellExecuteA(INPUT  0,

                    INPUT  "Open":U,

                    INPUT  pchCommand,

                    INPUT  pchParameters,

                    INPUT  pchDirectory,

                    INPUT  IF plgShow THEN 1 ELSE 0,

                    OUTPUT iinResult ).

 RETURN iinResult.

END FUNCTION.

and then replacing

OS-COMMAND SILENT VALUE(QUOTER(PTempDir + "TEMP.BAT")).

with

RunCommand(QUOTER(PTempDir + "TEMP.BAT"), "", "", FALSE).

You can off course run ShellExecuteA directly and skip the function.

//Bo

Posted by atuldalvi123 on 12-Dec-2016 10:06

Hi Haslund,

I modified rtp_compress.p as suggested above but its blocking me for normal bmp & jpeg files and even not working for files having special characters in the name. Not sure why.

Posted by atuldalvi123 on 14-Dec-2016 13:18

Hi Guyz

Issue resolved by adding "chcp 1250" in my batch file with few changes

This thread is closed