pwlin / cordova-plugin-file-opener2

A File Opener Plugin for Cordova
MIT License
314 stars 584 forks source link

Error "looking for file at (null)" when using german umlauts in the file name #252

Closed tillsanders closed 5 years ago

tillsanders commented 5 years ago

Expected Behaviour

When opening a pdf like so, I would expect the pdf to be opened ;)


cordova.plugins.fileOpener2.open(
  "file:///var/mobile/Containers/Data/Application/{...}/Library/NoCloud/ümlaut.pdf",
  'application/pdf',
  {
    error: () => reject(new Error('Error while opening file.')),
    success: () => resolve(),
  },
);

### Actual Behaviour

The error callback is executed and a message in XCode appears:

`looking for file at (null)`

When not using umlauts (ä, ö, ü) in the file name, it works as expected.

### Reproduce Scenario

#### Platform and Version

Tested with:

- cordova-plugin-file-opener2 2.2.0
- XCode 10.1
- cordova 8.1.1
- cordova-ios 4.5.5
- iOS 12.1.2

Other plugins: 

- cordova-plugin-file
- cordova-plugin-statusbar
- cordova-plugin-whitelist
shnist commented 5 years ago

hi @tillsanders thanks for raising this issue. Will take a look.

shnist commented 5 years ago

as a reference, this issue has been around for a while https://github.com/pwlin/cordova-plugin-file-opener2/issues/190. thought it was resolve in 2.2.0, but obviously not.

shnist commented 5 years ago

Going to close this ticket as a duplicate of https://github.com/pwlin/cordova-plugin-file-opener2/issues/190