Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 6449

Show
Ignore:
Timestamp:
03/19/07 12:49:23 (2 years ago)
Author:
bitsweat
Message:

SQLite: binary escaping works with ='u'. Closes #7862.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activerecord/CHANGELOG

    r6444 r6449  
    11*SVN* 
     2 
     3* SQLite: binary escaping works with $KCODE='u'.  #7862 [tsuka] 
    24 
    35* Base#to_xml supports serialized attributes.  #7502 [jonathan] 
  • trunk/activerecord/lib/active_record/connection_adapters/sqlite_adapter.rb

    r6091 r6449  
    6969      class <<  self 
    7070        def string_to_binary(value) 
    71           value.gsub(/\0|\%/) do |b| 
     71          value.gsub(/\0|\%/n) do |b| 
    7272            case b 
    7373              when "\0" then "%00" 
     
    7878 
    7979        def binary_to_string(value) 
    80           value.gsub(/%00|%25/) do |b| 
     80          value.gsub(/%00|%25/n) do |b| 
    8181            case b 
    8282              when "%00" then "\0"