Git Product home page Git Product logo

Comments (7)

metaskills avatar metaskills commented on May 23, 2024

Just getting to looking at bugs. Have you defined a regex that addresses this?

from activerecord-sqlserver-adapter.

psy-q avatar psy-q commented on May 23, 2024

We couldn't figure out exactly why and where it failed (on the UTF-8 characters? On some UTF-8 settings?) so we simply excluded that field from the list of fields passed to the adapter. It's only a workaround, but it works for now.

I'm sorry we're not more useful in this :(

from activerecord-sqlserver-adapter.

metaskills avatar metaskills commented on May 23, 2024

I'll keep this open and hopefully someone can post more info

from activerecord-sqlserver-adapter.

metaskills avatar metaskills commented on May 23, 2024

FYI, I tried last night to add a test for this and if failed badly. Maybe someone can pickup up where I left off and debug this? Here is what I did. First I changed the columns method to create a SQLServerColumn with a name that was correctly encoded. See below.

def columns(table_name, name = nil)
#...
sqlserver_options = ci.except(:name,:default_value,:type,:null)
column_name = SQLServerColumn.string_to_utf8_encoding(ci[:name])
SQLServerColumn.new column_name, ci[:default_value], ci[:type], ci[:null], sqlserver_options

Then in unicode_test_sqlserver.rb I created a new context "Testing unicode column names" and added a column to the our unicode test table like so.

SqlServerUnicode.connection.add_column :sql_server_unicodes, 'arcångel', :string

Then started writing some assertions. I found that I was making headway and getting the column definition for the name back in unicode, but all other insert/update SQL statements were failing due to some 8BIT-ASCII/UTF-8 mix match. Perhaps someone can pick this up and dig around more?

from activerecord-sqlserver-adapter.

KDGundermann avatar KDGundermann commented on May 23, 2024

Hi Ken,

Perhaps someone can pick this up and dig around more?
Yes I am willing to do so, BUT currently I have some problems to run
rake test on Windows...

from activerecord-sqlserver-adapter.

KDGundermann avatar KDGundermann commented on May 23, 2024

FYI
http://yehudakatz.com/2010/05/17/encodings-unabridged/

"The problem of incompatible encodings is likely to happen in Western applications only when combining ISO-8859-* data with Unicode data"

The vast majority of encoding bugs to date have resulted from outdated drivers that returned BINARY data instead of Strings with proper encoding tags.

from activerecord-sqlserver-adapter.

metaskills avatar metaskills commented on May 23, 2024

Old and closing

from activerecord-sqlserver-adapter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.