Jzonic Yawiki, čeština bude
Pokud používáte wiki Jzonic Yawiki, pak Vás možná štve
absence možnosti nastavit kódování. Vzhledem k tomu, že se mi Yawiki opravdu líbí, neváhal jsem a
napsal jsem Andreasy Meckymu, jakožto jejímu autorovi.
Hi Andreas,
thanks to Yawiki. I have problem with page encoding in Yawiki. I dont
know, if you have set any encoding information to HTTP response header,
but encoding information via meta element in HTML result missed too.
This is problem for any other character encoding than ISO-8859–1. For my
(czech) is possible encoding Windows-1250, ISO-8859–2, utf-8 and other
but no ISO-8859–1. For any other languages or more precisely characters
is ISO-8859–1 unusable.
I think that Yawiki should prefer unicode e.g. utf-8. utf-8 is suiteble
for any known characters. If i miss correct my, it can be simple to
switch encoding to utf-8. You can to do it in Servlet filter
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
((HttpServletRequest)request).setCharacterEncoding(“UTF-8”);
((HttpServletResponse)response).setContentType(“text/html;charset=UTF-8”);
chain.doFilter(request,response);
}
or change it in controller servlet.
Vzhledem k tomu, že odpověď dlouho nepřicházela, začal jsem si pohrávat s myšlenkou, že
můj dotaz zůstal vyset kdesi v chapadlech SPAM filtru. Naštěstí Andreas neměl pouze čas a na
Silvestra dorazila potěšující odpověď.
Hi Roman,
sorry that it took some time to answer.
I will include the encoding informations in the configuration within the
next version.
When I find the time I will release a patched version within the next 2
weeks.
I will send you an email when the patch is ready.
Andreas
Související články
Související epizody CZ Podcastu
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi a Filemon o novinkách v Javě 6 a webových frameworcích.
- #1 · Vývojová prostředí v Javě
První díl CZ Podcastu se věnuje vývojovým prostředím pro Javu.