diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-03 09:09:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-12-03 09:09:25 (GMT) |
commit | b1517df3ff0aa3be2bb952a719ffbbc27d69e226 (patch) | |
tree | 775035ad317d0c0fe0fb8cbf923362a7eef0f40a /library | |
parent | a2e1bdf3b541497d607533fa83d88daebca4737e (diff) | |
download | tcl-b1517df3ff0aa3be2bb952a719ffbbc27d69e226.zip tcl-b1517df3ff0aa3be2bb952a719ffbbc27d69e226.tar.gz tcl-b1517df3ff0aa3be2bb952a719ffbbc27d69e226.tar.bz2 |
Simplify some \\u???? escape sequences to \\x??
Diffstat (limited to 'library')
-rw-r--r-- | library/cookiejar/cookiejar.tcl | 6 | ||||
-rw-r--r-- | library/cookiejar/idna.tcl | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/library/cookiejar/cookiejar.tcl b/library/cookiejar/cookiejar.tcl index 6c8e82b..cfa73ae 100644 --- a/library/cookiejar/cookiejar.tcl +++ b/library/cookiejar/cookiejar.tcl @@ -132,7 +132,7 @@ package provide cookiejar \ # The implementation of the cookiejar package ::oo::define ::http::cookiejar { self { - method configure {{optionName "\u0000\u0000"} {optionValue "\u0000\u0000"}} { + method configure {{optionName "\x00\x00"} {optionValue "\x00\x00"}} { set tbl { -domainfile {domainfile set} -domainlist {domainlist set} @@ -149,14 +149,14 @@ package provide cookiejar \ dict lappend tbl -purgeold [namespace code { my IntervalTrigger PostponePurge }] - if {$optionName eq "\u0000\u0000"} { + if {$optionName eq "\x00\x00"} { return [dict keys $tbl] } set opt [::tcl::prefix match -message "option" \ [dict keys $tbl] $optionName] set setter [lassign [dict get $tbl $opt] varname] namespace upvar [namespace current] $varname var - if {$optionValue ne "\u0000\u0000"} { + if {$optionValue ne "\x00\x00"} { {*}$setter var $optionValue } return $var diff --git a/library/cookiejar/idna.tcl b/library/cookiejar/idna.tcl index 88c2b9d..658dcd6 100644 --- a/library/cookiejar/idna.tcl +++ b/library/cookiejar/idna.tcl @@ -27,9 +27,9 @@ namespace eval ::tcl::idna { proc IDNAencode hostname { set parts {} # Split term from RFC 3490, Sec 3.1 - foreach part [split $hostname "\u002E\u3002\uFF0E\uFF61"] { + foreach part [split $hostname "\x2E\u3002\uFF0E\uFF61"] { if {[regexp {[^-A-Za-z0-9]} $part]} { - if {[regexp {[^-A-Za-z0-9\u00a1-\uffff]} $part ch]} { + if {[regexp {[^-A-Za-z0-9\xA1-\uFFFF]} $part ch]} { scan $ch %c c if {$ch < "!" || $ch > "~"} { set ch [format "\\u%04x" $c] @@ -51,7 +51,7 @@ namespace eval ::tcl::idna { proc IDNAdecode hostname { set parts {} # Split term from RFC 3490, Sec 3.1 - foreach part [split $hostname "\u002E\u3002\uFF0E\uFF61"] { + foreach part [split $hostname "\x2E\u3002\uFF0E\uFF61"] { if {[string match -nocase "xn--*" $part]} { set part [punydecode [string range $part 4 end]] } @@ -116,7 +116,7 @@ namespace eval ::tcl::idna { # Handle the basic code points: foreach ch $string { - if {$ch < "\u0080"} { + if {$ch < "\x80"} { if {$case eq ""} { append output $ch } elseif {[string is true $case]} { |