Comments (7)
Just getting to looking at bugs. Have you defined a regex that addresses this?
from activerecord-sqlserver-adapter.
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.
I'll keep this open and hopefully someone can post more info
from activerecord-sqlserver-adapter.
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.
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.
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.
Old and closing
from activerecord-sqlserver-adapter.
Related Issues (20)
- Rails 7 fails with Enum columns HOT 1
- Rails 7 insert data in table in different schema fails HOT 7
- ActiveRecord::ConnectionAdapters::SQLServerAdapter does not support upsert HOT 2
- Warning: undefining the allocator of T_DATA class TinyTds::Result HOT 1
- TinyTds::Error: Server name not found in configuration files HOT 1
- 7.0.2.0 identity insert issue
- Tests failing following release of Rails v7.0.5
- Rails 7.1 HOT 1
- Copyright missing the Copyright owner
- [Rails 7.1] Upgrading the MSSQL adapter HOT 7
- Migration to Create Stored Procedure Incorrectly Treated as an Insert Statement HOT 1
- NotNullViolation in boolean field of view HOT 7
- TinyTds::Error: Error converting data type varchar to numeric. HOT 6
- String default value not retrieved when using views HOT 4
- Tracking rails/solid_cache compatibility
- Default value read from another field HOT 1
- Is add_check_constraint supported? HOT 3
- `raw_connection_do` method removed in 7.1.0 but still referenced in Readme HOT 2
- Composite Primary Keys not being recognised HOT 2
- limit() method with subqueries HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from activerecord-sqlserver-adapter.