You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mscoon <ms...@gmail.com> on 2019/04/04 12:52:00 UTC

AjaxDownloadBehavior with location=blob and greek filenames problems

Hi all,

When using the AjaxDownloadBehavior with Location=Blob and a greek
filename, the filename is url encoded.

E.g. if the file is "αρχείο.txt" (as defined in
ResourceStreamResource.setFilename()), the downloaded file is
"%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%BF.txt" which is the url encoded result
of the original filename.

This happens because ResourceStreamResource url encodes the filename -
something that works fine for Location=IFrame or Location=SameWindow.
However for Location=Blob it seems that the javascript code that constructs
the blob needs to url decode the filename...

Apparently this does not apply only to greek chars in filenames, but to all
non-ascii chars...

This has been tested in chrome and firefox.

Marios

Re: AjaxDownloadBehavior with location=blob and greek filenames problems

Posted by Martin Grigorov <mg...@apache.org>.
Hi,

Please create a ticket in JIRA and we will take a look at it!

On Thu, Apr 4, 2019 at 3:52 PM mscoon <ms...@gmail.com> wrote:

> Hi all,
>
> When using the AjaxDownloadBehavior with Location=Blob and a greek
> filename, the filename is url encoded.
>
> E.g. if the file is "αρχείο.txt" (as defined in
> ResourceStreamResource.setFilename()), the downloaded file is
> "%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%BF.txt" which is the url encoded result
> of the original filename.
>
> This happens because ResourceStreamResource url encodes the filename -
> something that works fine for Location=IFrame or Location=SameWindow.
> However for Location=Blob it seems that the javascript code that constructs
> the blob needs to url decode the filename...
>
> Apparently this does not apply only to greek chars in filenames, but to all
> non-ascii chars...
>
> This has been tested in chrome and firefox.
>
> Marios
>

Re: AjaxDownloadBehavior with location=blob and greek filenames problems

Posted by mscoon <ms...@gmail.com>.
Thank you!

On Fri, Apr 5, 2019 at 1:14 PM Martin Grigorov <mg...@apache.org> wrote:

> https://issues.apache.org/jira/browse/WICKET-6650
>
> On Thu, Apr 4, 2019 at 5:29 PM Sven Meier <sv...@meiers.net> wrote:
>
> >
> >
> > Hi,
> >
> >
> >
> > You're right, our JavaScript should decode the filename.
> >
> >
> >
> > Please open a Jira issue.
> >
> >
> >
> > Have fun
> >
> > Sven
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > >
> > > On 04.04.2019 at 14:52,  <mscoon>  wrote:
> > >
> > >
> > >  Hi all, When using the AjaxDownloadBehavior with Location=Blob and a
> > greek filename, the filename is url encoded. E.g. if the file is
> > "αρχείο.txt" (as defined in ResourceStreamResource.setFilename()), the
> > downloaded file is "%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%BF.txt" which is
> the
> > url encoded result of the original filename. This happens because
> > ResourceStreamResource url encodes the filename - something that works
> fine
> > for Location=IFrame or Location=SameWindow. However for Location=Blob it
> > seems that the javascript code that constructs the blob needs to url
> decode
> > the filename... Apparently this does not apply only to greek chars in
> > filenames, but to all non-ascii chars... This has been tested in chrome
> and
> > firefox. Marios
> > >
> >
>

Re: AjaxDownloadBehavior with location=blob and greek filenames problems

Posted by Martin Grigorov <mg...@apache.org>.
https://issues.apache.org/jira/browse/WICKET-6650

On Thu, Apr 4, 2019 at 5:29 PM Sven Meier <sv...@meiers.net> wrote:

>
>
> Hi,
>
>
>
> You're right, our JavaScript should decode the filename.
>
>
>
> Please open a Jira issue.
>
>
>
> Have fun
>
> Sven
>
>
>
>
>
>
>
>
>
>
> >
> > On 04.04.2019 at 14:52,  <mscoon>  wrote:
> >
> >
> >  Hi all, When using the AjaxDownloadBehavior with Location=Blob and a
> greek filename, the filename is url encoded. E.g. if the file is
> "αρχείο.txt" (as defined in ResourceStreamResource.setFilename()), the
> downloaded file is "%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%BF.txt" which is the
> url encoded result of the original filename. This happens because
> ResourceStreamResource url encodes the filename - something that works fine
> for Location=IFrame or Location=SameWindow. However for Location=Blob it
> seems that the javascript code that constructs the blob needs to url decode
> the filename... Apparently this does not apply only to greek chars in
> filenames, but to all non-ascii chars... This has been tested in chrome and
> firefox. Marios
> >
>

Re: AjaxDownloadBehavior with location=blob and greek filenames problems

Posted by Sven Meier <sv...@meiers.net>.
  
  
Hi,
  

  
You're right, our JavaScript should decode the filename.
  

  
Please open a Jira issue.
  

  
Have fun
  
Sven
  

  
  

  
  
  
  
  
>   
> On 04.04.2019 at 14:52,  <mscoon>  wrote:
>   
>   
>  Hi all, When using the AjaxDownloadBehavior with Location=Blob and a greek filename, the filename is url encoded. E.g. if the file is "αρχείο.txt" (as defined in ResourceStreamResource.setFilename()), the downloaded file is "%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%BF.txt" which is the url encoded result of the original filename. This happens because ResourceStreamResource url encodes the filename - something that works fine for Location=IFrame or Location=SameWindow. However for Location=Blob it seems that the javascript code that constructs the blob needs to url decode the filename... Apparently this does not apply only to greek chars in filenames, but to all non-ascii chars... This has been tested in chrome and firefox. Marios  
>