Re: [Erlangweb-users] chinese character input and show
Brought to you by:
etcerlangweb,
paulgray
|
From: AndyChow <diu...@16...> - 2010-04-09 15:21:10
|
hi,
the following tpl is my simple app for show data list, include chinese unicode.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Erlang Web Shop - All Items</title>
</head>
<body>
<h1>All items that are stored in the shop:</h1>
<a href="/item/admin/add">Add Item</a>
<ul>
<wpart:list select="map" list="items" as="item">
<li>
<wpart:choose>
<wpart:when test="not {item:available}">
NOT AVAILABLE
</wpart:when>
</wpart:choose>
<a wpart:href="/item/show/{[integer]item:id}"><wpart:lookup key="item:name" /></a>
<a wpart:href="/item/admin/edit/{[integer]item:id}">Edit</a>
<a wpart:href="/item/admin/delete/{[integer]item:id}">Delete</a>
</li>
</wpart:list>
</ul>
</body>
</html>
AndyChow <diu...@16...> writes:
> when i input some chinese characters and submit to app, the chinese
> string can not show correctly. my page unicode is utf8.
>
> please give me hande, how to resolve this problem. :P
My crystal ball tells me that you need wpart_lookup_unbreak:
http://permalink.gmane.org/gmane.comp.lang.erlang.erlangweb.general/10
It might be wrong, though. Could you show the part of the template that
outputs the Chinese text?
|