ColdFusion 8 introduced a new feature which allows to use CFLOOP to read in a file line by line. This is a nice convenience method but I noticed that by default CFLOOP in this mode always uses iso-8859-1 encoding to read the file's content which of course causes trouble when the encoding of the file is e.g. utf-8. By accident I found that there's an undocumented attribute on the CFLOOP tag to set the charset to use when reading in a file:
<cfloop file="#path#" index="line" charset="utf-8">
...
</cfloop>
Dirk.
Nice catch / find with the undocumented feature. Be careful, though -- if you rely on this and CF pulls this argument or changes it, you application will likely break.
You should reach out to Adam Lehman (@adrocknaphobia on Twitter) and give him a heads up about this. Who knows, you might get the argument introduced in CF9.
I'm curious; does anyone know if Railo or OpenBSD supports this feature?