diff options
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/java/com/sun/star/script/framework/container/ParcelContainer.java | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java index 0b41f28fd3cd..7a3a20cdfd78 100644 --- a/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java +++ b/scripting/java/com/sun/star/script/framework/container/ParcelContainer.java @@ -174,12 +174,21 @@ public class ParcelContainer implements XNameAccess // TODO handler package ParcelContainer? if ( !containerUrl.startsWith( "vnd.sun.star.tdoc:" ) ) { - // return name - String decodedUrl = java.net.URLDecoder.decode( containerUrl ); - int indexOfSlash = decodedUrl.lastIndexOf('/'); - if ( indexOfSlash != -1 ) + try { - name = decodedUrl.substring( indexOfSlash + 1 ); + // return name + String decodedUrl = java.net.URLDecoder.decode( containerUrl, "UTF-8" ); + int indexOfSlash = decodedUrl.lastIndexOf('/'); + if ( indexOfSlash != -1 ) + { + name = decodedUrl.substring( indexOfSlash + 1 ); + } + } + catch (UnsupportedEncodingException e) + { + com.sun.star.uno.RuntimeException e2 = new com.sun.star.uno.RuntimeException(); + e2.initCause(e); + throw e2; } } else |