Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e34fa4aed8e57124d745216e74c026fcd4ec6a94d857a93e750d8d26398035ff
Ticket: 4e5007ea1b2855277b349964ef1512ad884edace
Document use case: http::formatQuery key
User & Date: kjnash on 2022-05-12 13:36:03
Changes

  1. icomment:
    Hi Harald,
    
    I'm not sure what your use case is.  How would this command be useful for msgcat?
    
    The array ::http::http is defined when package http is loaded: there is no need to make a HTTP request.  You can use http::mapReply without ever making a request.
    
    The "encoding convertto" is essential to produce a %-encoded string that corresponds to a sequence of bytes <i>in a specific character set</i>.  Normally we use the default utf-8, e.g.
    
    <verbatim>
    % package require http
    2.10a1
    % http::mapReply ©
    %C2%A9
    </verbatim>
    
    But if the recipient is expecting a different character set, the command can do that too:
    
    <verbatim>
    % http::config -urlencoding iso8859-1
    % http::mapReply ©
    %A9
    </verbatim>
    
    In HTTP applications there is no need to do encoding after the percent-encoding,  because the latter produces a string in a subset of ASCII that HTTP clients and servers are required by the RFCs to understand.
    
    Kind regards,
    
    Keith.
    
  2. login: "kjnash"
  3. mimetype: "text/x-fossil-wiki"