You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "markchen (JIRA)" <de...@velocity.apache.org> on 2008/07/14 06:45:31 UTC
[jira] Reopened: (VELOCITY-599) DataSourceResourceLoader doesn't
support UTF8
[ https://issues.apache.org/jira/browse/VELOCITY-599?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
markchen reopened VELOCITY-599:
-------------------------------
It seems that using the getBinaryStream still can't solve the problem.
I use the following to solve(?) the issue . It works fine in the environment mentioned,
but I still don't have a chance to test it in SQLSERVER.
:
//InputStream ascStream = rs.getAsciiStream(templateColumn);
Clob clob = rs.getClob(templateColumn);
String s = clob.getSubString(1, (int) clob.length());
InputStream ascStream = null;
try {
ascStream = new java.io.ByteArrayInputStream(s.getBytes("UTF-8"));
} catch (Exception ex) {
throw new ResourceNotFoundException("DataSourceResourceLoader:UnsupportedEncodingException");
}
:
> DataSourceResourceLoader doesn't support UTF8
> ---------------------------------------------
>
> Key: VELOCITY-599
> URL: https://issues.apache.org/jira/browse/VELOCITY-599
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.5
> Environment: WindowsServer2003 R2, Oracle10g(10.2.0,UTF8characterSet), jdk1.5.0_12
> Reporter: markchen
>
> If templates are stored in the database instead of files,the characters retrived becomes garbled.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org