View | Details | Raw Unified | Return to bug 10024
Collapse All | Expand All

(-)file_not_specified_in_diff (-28 / +7 lines)
Line 338 Link Here
338
Lines 353-355 Link Here
353
                // ORCL check here for unsupported encoding
352
	        if (charEncoding != null && !charEncoding.equals(""))
354
                if (charEncoding != null && !charEncoding.equals("")) {
355
                  try {
356
--
Lines 357-361 Link Here
357
                  } catch (java.io.UnsupportedEncodingException ex) {
358
                    throw new JspException ("Unsupported encoding : " + 
359
                     charEncoding);                     
360
                  }
361
                }
Lines 363-379 Link Here
363
                  // ORCL don't think ContentEncoding is what is wanted here
355
		    String responseAdvisoryEncoding = uc.getContentEncoding();
364
                  String responseAdvisoryEncoding = uc.getContentEncoding();
356
		    if (responseAdvisoryEncoding != null)
365
                  // instead, get charset from content type if there
357
		        r = new InputStreamReader(i, responseAdvisoryEncoding);
366
                  String responseAdvisoryType = uc.getContentType();
358
		    else
367
                  int len = responseAdvisoryType.indexOf("charset=") + 8;
359
		        r = new InputStreamReader(i, DEFAULT_ENCODING);
368
                  String charSet = ((len == -1 || len >
369
                       responseAdvisoryType.length()) ?  null :
370
                       responseAdvisoryType.substring(len,
371
                       responseAdvisoryType.length())); 
372
                  if (charSet != null && !charSet.equals("")) 
373
                      try { 
374
                        r = new InputStreamReader(i, charSet);
375
                       } catch (java.io.UnsupportedEncodingException ex) {
376
                         r = new InputStreamReader(i, DEFAULT_ENCODING);
377
                       }
378
                    else
379
                        r = new InputStreamReader(i, DEFAULT_ENCODING);
380
--
Line 389 Link Here
369

Return to bug 10024