Read a file character by character/UTF8: Difference between revisions
Content added Content deleted
m (Put languages into correct alphabetical order) |
(→{{header|Java}}: Added Common Lisp) |
||
Line 8: | Line 8: | ||
;See also |
;See also |
||
* [[Read a file line by line]] |
* [[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}}== |
=={{header|Java}}== |