Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Operating System: All
Platform: All
-
25995
Description
It looks like there are some changes made to the URLCodec class(rev 1.7 and 1.8)
that do not seem quite right (in my opinion).
The ENCODING variable in my original patch was made final static for a good
reason. It is not supposed to be anything but US-ASCII. After all, the whole
point of URL encoding is to represent non-ASCII data using a limited set of
ASCII characters only, hence, 'US-ASCII' as a final static variable ENCODING.
With the present code, if US-ASCII incompatible encoding is used (such as
UTF-16, EBCDIC), URLCodec may produce erroneous results. I understand that the
intention of the revision 1.7 & 1.8 was to allow for user defined default
encoding, but in its present form URLCodec does not seem to produce the desired
results.
The patch I am about to attach should take care of the problem while retaining
the existing (intended) semantics of the URLCodec class.
Oleg