Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 31841 - FileURL (& NbfsURLConnection) need to handle strange file characters better
FileURL (& NbfsURLConnection) need to handle strange file characters better
Product: platform
Classification: Unclassified
Component: Filesystems
PC Linux
: P3 (vote)
: 3.x
Assigned To: rmatous
Depends on: 39613
Blocks: 34317
  Show dependency treegraph
Reported: 2003-03-10 20:41 UTC by Jesse Glick
Modified: 2008-12-22 19:19 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2003-03-10 20:41:35 UTC
Especially '#' in a path component of a FileObject
must be escaped and cannot be left as is in an
nbfs: URL. Looks like '#' in file system names are
escaped but not paths within a file system - with
core/localfs this will become more of a problem I

'?' is also a special character for URLs.
Comment 1 Jesse Glick 2003-03-10 20:44:02 UTC
Specifically, got on console:

has a fragment ID.

while doing a text search /space/src, which includes the subdir ant/
containing Apache Ant sources.
Comment 2 rmatous 2003-03-12 10:06:22 UTC
Do you think, that we need to keep strange escaping mechanism with 'Q'
prefix ? I would like to replace it with %xy pattern  which everybody
is familier with. I expect, that backward compatibility (decode) must
be kept, but encoding can be completely replaced. 
Comment 3 Jesse Glick 2003-03-12 14:54:43 UTC
Completely agreed.

One idea for how to make such a change compatible: move the name of
the file system into the 'host' part of the URL. That should be enough
to unambiguously distinguish old nbfs: URLs from the new. E.g.


Another possibility is to simply use a different URL protocol, e.g.


Anyway getting rid of the weird Q-escapes would be very nice.
Comment 4 rmatous 2003-06-09 13:21:10 UTC
Fixed in trunk.

new revision: 1.5; previous revision: 1.4

/cvs/openide/src/org/openide/filesystems/,v  <--
new revision: 1.19; previous revision: 1.18

/cvs/openide/src/org/openide/filesystems/,v  <--
initial revision: 1.1
Comment 5 Jaroslav Tulach 2003-06-09 14:26:52 UTC
I would be valuable to add also some test cases. I'd bet you had some
anyway to test the behaviour, so just turn them into NbTestCase please.
Comment 6 rmatous 2003-06-10 14:32:35 UTC
Test added. 

new revision: 1.15; previous revision: 1.14
Comment 7 Jaroslav Tulach 2003-06-10 16:13:15 UTC
A test is there and seems to call decode & encode URL methods.
Comment 8 _ pkuzel 2003-06-25 17:03:16 UTC
Is <nbfs://%2Fhome%2Fpk97937%2Fbugs/is34/x317/emptyDTD.dtd> valid URL?
Parser denies to accept it. Original nbfs coding scheme used Q escaping.

I cannot render the specification
<>. So I tried Mozilla and it also
denies URLs that contain escaping in host name. Escaping is OK in path.

Please resolve soon as issue 34317 is Q-build blocker.
Comment 9 _ pkuzel 2003-06-25 17:30:00 UTC
Appendix A reads:

      hostname      = *( domainlabel "." ) toplabel [ "." ]
      domainlabel   = alphanum | alphanum *( alphanum | "-" ) alphanum
      toplabel      = alpha | alpha *( alphanum | "-" ) alphanum

So really escaped is not allowed in host name.
Comment 10 Jiri Kovalsky 2003-06-27 09:47:04 UTC
Could somebody please do something about it ? This bug prevents issue
#34317 to be fixed and thus takes over its Q-build showstopper
attribute ! Increasing prirority ...
Comment 11 rmatous 2003-06-27 11:54:52 UTC
Fixed in trunk:

/cvs/openide/src/org/openide/filesystems/,v  <--
new revision: 1.2; previous revision: 1.1

and also in QBE200306250100:

/cvs/openide/src/org/openide/filesystems/,v  <--
new revision:; previous revision: 1.1
Comment 12 dmladek 2003-06-27 16:31:39 UTC
I'm verifying it because fix is solving performance problem
mentioned in the issue #34456

Maybe that issue is duplicate of this one...
Comment 13 Martin Schovanek 2003-06-30 10:28:32 UTC
Verified, the fix is solving problem mentioned in the issue #34317.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo