[Klone-users] Unicode display
Stefano Barbato
barbato at koanlogic.com
Thu Mar 6 08:33:44 EST 2008
On 06/mar/08, at 11:13, Trung, Tran Minh wrote:
> Hi,
> In Klone, io_printf(out,”%s”, s) function can display in Unicode
> utf16. If not, which function or how to display Unicode text!? All
> Unicode text is in a text file like test.txt
>
> Thanks,
>
> Tran Minh Trung
>
Hi,
you can write out the whole Unicode file loading it in a buffer and
printing it with io_write:
---[ index.kl1 ]---
<body>
<%
char *buf = NULL;
size_t size;
if(u_load_file("/path/to/the/text/file.txt", 0, &buf, &size) == 0)
{
io_write(out, buf, size);
u_free(buf); buf = NULL;
}
%>
</body>
-------------------
for more info on u_load_file go to http://www.koanlogic.com/libu/api/html/group__misc.html#ga15
bye,
s
More information about the klone-users
mailing list