Changeset 13364 in project


Ignore:
Timestamp:
02/20/09 00:29:29 (10 years ago)
Author:
zbigniew
Message:

ssax: better utf8 fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/ssax/ssax-core.scm

    r13362 r13364  
    66(declare
    77  (fixnum)
    8   (not standard-bindings string) ; you must load utf8 to convert numeric entities > 255
    98  (export SSAX:warn SSAX:skip-pi attlist-fold
    109          SSAX:Prefix-XML SSAX:complete-start-tag SSAX:skip-S SSAX:read-markup-token
     
    1817
    1918(use srfi-1 srfi-13)
     19;; Numeric entities are converted to UTF-8 byte sequences.
     20(define-constant char->utf8-string ##sys#char->utf8-string)
    2021
    2122;(define pp pretty-print)
     
    21892190                  (read-char port)
    21902191                  (read-attrib-value delimiter port entities
    2191                      (cons (string (SSAX:read-char-ref port)) new-fragments)))
     2192                     (cons (char->utf8-string (SSAX:read-char-ref port)) new-fragments)))
    21922193                (else
    21932194                 (read-attrib-value delimiter port entities
     
    28912892                        ((#\#) (read-char port)
    28922893                         (loop (str-handler fragment
    2893                                        (string (SSAX:read-char-ref port))
     2894                                       (char->utf8-string (SSAX:read-char-ref port))
    28942895                                       seed)))
    28952896                        (else
Note: See TracChangeset for help on using the changeset viewer.