Changeset 33652 in project


Ignore:
Timestamp:
09/13/16 20:37:15 (5 years ago)
Author:
sjamaan
Message:

Also apply srfi-14 workaround to prcc alternative. All tests pass!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/uri-generic/trunk/alternatives/uri-generic.prcc.scm

    r33650 r33652  
    284284;;
    285285
     286;; The SRFI-14 library uses Latin1, and its definition of "letter"
     287;; includes accented letters with high bit. This wreaks havoc with
     288;; UTF-8 URIs.  Besides, the RFC only discusses ASCII letters anyway.
     289(define char-set:ascii-letter
     290  (string->char-set
     291   "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"))
     292
     293(define char-set:ascii-letter+digit
     294  (char-set-union char-set:ascii-letter char-set:digit))
     295
    286296(define char-set:uri-unreserved
    287   (char-set-union char-set:letter+digit (string->char-set "-_.~")))
     297  (char-set-union char-set:ascii-letter+digit (string->char-set "-_.~")))
    288298
    289299(define unreserved (one-of (char-set->string char-set:uri-unreserved)))
    290300
     301(define alpha (one-of (char-set->string char-set:ascii-letter)))
    291302
    292303;; Turns a URI into a string.
     
    461472;;               / "25" %x30-35        ; 250-255
    462473
    463 (define alpha (one-of (char-set->string char-set:letter)))
    464474(define numeric (one-of (char-set->string char-set:digit)))
    465475
Note: See TracChangeset for help on using the changeset viewer.