Tomasz Skutnik | 12 Apr 22:43
Picon

Multibyte external file format patch for cl-emb::contents-of-file function

Hi.

I've encountered the problem with contents-of-file function, that manifests itself for multibyte external file encodings (e.g. UTF-8). contents-of-file allocates (file-length in) characters, which for multibyte encodings is less then number of characters read by read-sequence. This leaves dangling characters (implementation dependent) at end of template code. Attached patch solves the problem.

Apply at will.

Thanks

Tomasz

Attachment (cl-emb-0.4.3-cof.patch): text/x-diff, 953 bytes
<div><p>Hi.<br><br>I've encountered the problem with contents-of-file function, that manifests itself for multibyte external file encodings (e.g. UTF-8). contents-of-file allocates (file-length in) characters, which for multibyte encodings is less then number of characters read by read-sequence. This leaves dangling characters (implementation dependent) at end of template code. Attached patch solves the problem.<br><br>Apply at will.<br><br>Thanks<br><br>Tomasz<br><br></p></div>

Gmane