Apex_util.Download_print_document Creates Incorrect File names When Using Special Characters (Doc ID 1441212.1)

Last updated on SEPTEMBER 20, 2016

Applies to:

Oracle Application Express (formerly HTML DB) - Version 4.1.1 and later
Information in this document applies to any platform.

Symptoms


When downloading a report with procedure "APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT", with a filename that contains a dot ("."), the filename will be truncated just after the first the dot.

The problem happens due to the "." in the filename, however, the "period" is part of the German dateformat "DD.MM.YYYY" which is being used in the filename.

The filename has the following format (composed at runtime):
<some name><space><current date in German date format><space><some ID>
e.g. 'Objektpruefung 02.08.2010 1000'

At runtime, the filename is being truncated to: Objektpruefung 02.pdf

In addition, when there is an umlaut in the name and the number of characters exceeds a limit, then the filename will be produced as garbage in FireFox.
e.g.:
Something weird in Firefox when German umlaut in Filename:

1. Filename correct in both IE and FF:
Filename in process:     Umlaut ü 123456789012345678901234567890123
Download filename IE:  Umlaut ü 123456789012345678901234567890123.pdf
Download filename FF: Umlaut ü 123456789012345678901234567890123.pdf

2. Filename correct in IE, garbage in FF:
Filename in process:     Umlaut ü 1234567890123456789012345678901234 (<== one more character!!!)
Download filename IE:  Umlaut ü 1234567890123456789012345678901234.pdf
Download filename FF:  =_utf-8_B_VW1sYXV0IMO8IDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQucGRm

If the ü is changed to ue then the problem does not happen in FF and even much longer filenames are possible.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms