AR-JDBC encoding problem
------------------------
Key: JRUBY-2688
URL: http://jira.codehaus.org/browse/JRUBY-2688
Project: JRuby
Issue Type: Bug
Components: ActiveRecord-JDBC
Affects Versions: JRuby 1.1.2
Environment: Windows Vista Home
JRuby 1.1.2
Rails 2.1
AR-JDBC 0.8.2
MS SQLServer 2005
JSDK 1.6.0_05
Reporter: Nelson Fernandez
I'm testing JRuby with MS SQLServer jdbc adapter with a iso-8859-1 setup
(webpages, database collation, etc).... I can't save data with accents
(áéíóúñ).. instead they are replaced with the question mark ( ? ) symbol.
This test work ok with Ruby MRI and DBI:ADO setup.
I traced the problem and I think that it is at
JdbcAdapterInternalService.execute_update .. there I see this code:
stmt.executeUpdate(rubyApi.convertToRubyString(sql).getUnicodeValue())
Is possible that convertToRubyString/getUnicodeValue is making some weird
things ?
or I'm doing something wrong ?
the code showed by the Rails log for the update is:
Usuario Update (0.000283) UPDATE usuarios SET [nombre] = 'Danielá' WHERE [id]
= 9
the final result in the database is: Daniel?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email