Tcl Source Code

View Ticket
Login
Ticket UUID: 6898f9cb71b90c92bbae2d08e20ee7c5a2588b88
Title: shiftjis is presumably misspelled in http 2.7.7
Type: Bug Version: 2.7.7
Submitter: anonymous Created on: 2014-01-03 02:15:02
Subsystem: 29. http Package Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2022-05-11 19:13:18
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2022-05-11 19:13:18
Description:
This code:

1390     } elseif {[regexp {shift[-_]?js} $charset]} {
1391         set encoding "shiftjis"

looks like shiftjis is misspelled in the regexp. If it isn't, the code should be commented accordingly
User Comments: jan.nijtmans added on 2022-05-11 19:13:18:

Another related bug: 'http::CharsetToEncoding latin4' gives an exception, because the switch-statement only handles number 1,2,3 and 5.

All should be fixed now. More test-cases added, to prove that it now works as expected.

Thanks, @kjnash, for digging up this oooooooold bug!


kjnash added on 2022-05-10 21:00:19:
Yes, this does seem to be a typo.  I don't know if anyone still uses shift_jis rather than utf-8, but if nobody objects I will change the regexp to {shift[-_]?jis}