Ticket #732 (closed defect: worksforme)
small unicode problem
| Reported by: | kmorgan | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | IDE | Version: | 1.4 |
| Keywords: | Cc: |
Description (last modified by gb) (diff)
I'm doing an experiment in formatting some files that use Devanagari unicode characters. The input file is utf8, and it's my intention to produce a utf8 output file. The following function reads a sexp, and for each correctly prints a Devanagari word to the screen, and apparently writes the same word as garbage to the output file. Can you please tell me the right stream parameters? Thanks.
(defun format-dict ()
(let ((fi "/Users/kmorgan/documents/yoga/sanskrit/roots/roots.txt")
(fo "/Users/kmorgan/documents/yoga/sanskrit/roots/dict.txt"))
(with-open-file (si fi :external-format :utf-8)
(with-open-file (so fo :direction :output :if-exists :supersede :external-format :utf-8)
(let ((*print-miser-width* 120))
(do ((x (read si nil nil) (read si nil nil)))
((null x))
(princ (second (second x)) so)
(princ (second (second x)))
;(print-entry so x)
))))))
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

