Next: , Previous: , Up: Utils   [Contents]

27.5 Useful string operation

If you want to get all the contents from a file into a string, then don’t use get-string-all imported from rnrs. Because it will not detect the correct charset from the locale, and this may cause the length differ from the actual value. Although GNU Artanis can handle this length issue properly, you should use get-string-all-with-detected-charset when you need to do something like this. If you don’t care about the contents encoding but just want to get the them, it’s better to use get-bytevector-all imported from rnrs.

(get-string-all-with-detected-charset filename)