Anonymous user
Read a file character by character/UTF8: Difference between revisions
Read a file character by character/UTF8 (view source)
Revision as of 14:20, 11 February 2014
, 10 years ago→{{header|Java}}: Added Common Lisp
m (Put languages into correct alphabetical order) |
(→{{header|Java}}: Added Common Lisp) |
||
Line 8:
;See also
* [[Read a file line by line]]
=={{header|Common Lisp}}==
{{works with|CLISP}}{{works with|Clozure CL}}{{works with|CMUCL}}{{works with|SBCL}}
<lang lisp>;; CLISP puts the external formats into a separate package
#+clisp (import 'charset:utf-8 'keyword)
(with-open-file (s "input.txt" :external-format :utf-8)
(loop for c = (read-char s nil)
while c
do (format t "~a" c)))</lang>
=={{header|Java}}==
|