Raymond Toy pushed to branch issue-367-count-octets-for-encoding at cmucl / cmucl Commits: f0298943 by Raymond Toy at 2025-01-12T13:09:13-08:00 Fix typos in octet-count in utf-16 and utf-32 Too much cutting and pasting so that we incorrectly named `octet-count` as `code-to-octets`. Fix the names. - - - - - 171e34ac by Raymond Toy at 2025-01-12T13:25:08-08:00 Fix typo in utf-32-be: Remove extra closing paren - - - - - 6 changed files: - src/pcl/simple-streams/external-formats/utf-16-be.lisp - src/pcl/simple-streams/external-formats/utf-16-le.lisp - src/pcl/simple-streams/external-formats/utf-16.lisp - src/pcl/simple-streams/external-formats/utf-32-be.lisp - src/pcl/simple-streams/external-formats/utf-32-le.lisp - src/pcl/simple-streams/external-formats/utf-32.lisp Changes: ===================================== src/pcl/simple-streams/external-formats/utf-16-be.lisp ===================================== @@ -111,7 +111,7 @@ Unicode replacement character.") ;; The state is either NIL or a codepoint, so nothing really ;; special is needed to copy it. `(progn ,state)) - (code-to-octets (code state error) + (octet-count (code state error) `(cond ((< ,code #x10000) 2) ((< ,code #x110000) ===================================== src/pcl/simple-streams/external-formats/utf-16-le.lisp ===================================== @@ -112,7 +112,7 @@ Unicode replacement character.") ;; The state is either NIL or a codepoint, so nothing really ;; special is needed. `(progn ,state)) - (code-to-octets (code state error) + (octet-count (code state error) `(cond ((< ,code #x10000) 2) ((< ,code #x110000) ===================================== src/pcl/simple-streams/external-formats/utf-16.lisp ===================================== @@ -157,7 +157,7 @@ Unicode replacement character.") (copy-state (state) ;; The state is list. Copy it `(copy-list ,state)) - (code-to-octets (code state error) + (octet-count (code state error) `(progn #+nil (unless ,state ===================================== src/pcl/simple-streams/external-formats/utf-32-be.lisp ===================================== @@ -64,7 +64,7 @@ Unicode replacement character.") (out ,code))))) () () - (code-to-octets (code state error) + (octet-count (code state error) `(cond ((lisp::surrogatep ,code) (if ,error (locally @@ -75,4 +75,4 @@ Unicode replacement character.") ;; Replacement character is 2 octets 2)) (t - 4))))) + 4)))) ===================================== src/pcl/simple-streams/external-formats/utf-32-le.lisp ===================================== @@ -65,7 +65,7 @@ Unicode replacement character.") (out ,code))))) () () - (code-to-octets (code state error) + (octet-count (code state error) `(cond ((lisp::surrogatep ,code) (if ,error (locally ===================================== src/pcl/simple-streams/external-formats/utf-32.lisp ===================================== @@ -115,7 +115,7 @@ Unicode replacement character.") (copy-state (state) ;; The state is either NIL or T, so we can just return that. `(progn ,state)) - (code-to-octets (code state output error i c) + (octet-count (code state error) `(progn ;; Should we count the BOM? #+nil View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/83db856a43a3e810cfdce03... -- View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/83db856a43a3e810cfdce03... You're receiving this email because of your account on gitlab.common-lisp.net.