dbd-jdbc 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -28,7 +28,7 @@ Rake::Task['manifest'].invoke # Always regen manifest, so Hoe has up-to-date lis
28
28
 
29
29
  begin
30
30
  require 'hoe'
31
- Hoe.new("dbd-jdbc", "0.1.0") do |p|
31
+ Hoe.new("dbd-jdbc", "0.1.1") do |p|
32
32
  p.rubyforge_name = "jruby-extras"
33
33
  p.url = "http://kenai.com/projects/dbd-jdbc"
34
34
  p.author = "Chad Johnson"
@@ -49,7 +49,7 @@ module DBI
49
49
  include_class 'java.util.HashMap'
50
50
  include_class 'java.util.Collections'
51
51
 
52
- VERSION = "0.1.0"
52
+ VERSION = "0.1.1"
53
53
  DESCRIPTION = "JDBC DBD driver for JRuby"
54
54
 
55
55
  #
@@ -46,7 +46,15 @@ module DBI::DBD::Jdbc
46
46
  if value.nil?
47
47
  @statement.setNull(param, @nulltype)
48
48
  elsif value.is_a?(String)
49
- @statement.setString(param, value.to_java_string)
49
+ #
50
+ # The syntax below appears to be the best way to ensure that
51
+ # RubyStrings get converted to Java Strings correctly if it
52
+ # contains UTF-8.
53
+ #
54
+ # java.lang.String.new() will assume the system default
55
+ # encoding when converting the RubyString bytes ....
56
+ #
57
+ @statement.setString(param, java.lang.String.new(value))
50
58
  elsif value.is_a?(Fixnum)
51
59
  #no reason not to coerce it to a long?
52
60
  @statement.setLong(param, value)
metadata CHANGED
@@ -46,12 +46,12 @@ requirements: []
46
46
 
47
47
  authors:
48
48
  - Chad Johnson
49
- date: 2009-08-18 05:00:00 +00:00
49
+ date: 2009-09-10 05:00:00 +00:00
50
50
  platform: ruby
51
51
  test_files: []
52
52
 
53
53
  version: !ruby/object:Gem::Version
54
- version: 0.1.0
54
+ version: 0.1.1
55
55
  require_paths:
56
56
  - lib
57
57
  dependencies: []