Changeset 12910 in project for wiki/eggref


Ignore:
Timestamp:
12/28/08 21:14:05 (12 years ago)
Author:
sjamaan
Message:

Document some changes in trunk, so I don't forget

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/uri-generic

    r12764 r12910  
    9797==== String encoding and decoding
    9898
    99 <procedure>(uri-encode-string STRING) => STRING</procedure>
     99<procedure>(uri-encode-string STRING [CHAR-SET]) => STRING</procedure>
    100100
    101 Returns the percent-encoded form of the given string.
     101Returns the percent-encoded form of the given string.  The optional
     102char-set argument controls which characters should be encoded.
     103It defaults to {{char-set:uri-reserved}}, plus the percent (%) character.
    102104
    103 <procedure>(uri-decode-string STRING) => STRING</procedure>
     105<procedure>(uri-decode-string STRING [CHAR-SET]) => STRING</procedure>
    104106
    105 Returns the decoded form of the given string.
     107Returns the decoded form of the given string.  The optional char-set
     108argument controls which characters should be decoded.  It defaults to
     109{{char-set:full}}.
    106110
    107111
     
    116120URI path segment normalization (RFC 3986 section 6.2.2.3)
    117121
     122
     123==== Character sets
     124
     125As a convenience for sub-parsers or other special-purpose URI handling
     126code, there are a couple of character sets exported by uri-generic.
     127
     128<constant>char-set:gen-delims</constant>
     129
     130Generic delimiters.
     131  gen-delims  =  ":" / "/" / "?" / "#" / "[" / "]" / "@"
     132
     133<constant>char-set:sub-delims</constant>
     134
     135Sub-delimiters.
     136  sub-delims  =  "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
     137
     138<constant>char-set:uri-reserved</constant>
     139
     140The union of {{gen-delims}} and {{sub-delims}}; all reserved URI characters.
     141  reserved    =  gen-delims / sub-delims
     142
     143<constant>char-set:uri-unreserved</constant>
     144
     145All unreserved characters that are allowed in an URI.
     146  unreserved  =  ALPHA / DIGIT / "-" / "." / "_" / "~"
     147
     148Note that this is _not_ the complement of {{char-set:uri-reserved}}!
     149There are several characters (even printable, noncontrol characters)
     150which are not allowed at all in an URI.
     151
     152
    118153=== Requires
    119154
     
    123158=== Version History
    124159
     160* trunk Export char-sets, add char-set arg to uri-encode/uri-decode
    125161* 1.12 Fix relative path normalization when original path ends in a slash, remove consecutive slashes from paths in URIs
    126162* 1.11 Added accessors for the authority components, functional update procedures. Fixed case-normalization.
Note: See TracChangeset for help on using the changeset viewer.