Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
schmmd
Starting Member
1 Post |
Posted - 2007-07-24 : 17:18:43
|
I have a java program that communicates with a SQL database. Previously, the java program called a "BULK INSERT" with CODEPAGE=65001 to import a UTF-8 unicode file. This seemed to import data fine, however it was rather undocumented. I tried converting the input file to UTF-16 (java wouldn't make a UCS-2 file) and "BULK INSERT"ing with DATAFILETYPE='widechar', which worked as well. Is one of these methods preferrable? Or is there a better method?Most of the data is handled just fine inside of SQL Server. However, certain texts do not compare correctly. I would expect nvarchar fields to compare themselves in unicode, however, if I do a "SELECT DISTINCT" on a set of Amharic words, they all collapse into a single word! Similarly, if I do a join on these words, SQL Server simply chooses the first Amharic word it finds, even if it isn't a match! Does anyone have any idea why SQL Server thinks these values are equal?If I convert the values to binary, they do indead show up as different.0x00132D1218129512000000000000000000000000000x05129512F5120000000000000000000000000000000x091303132B1272129B1200000000000000000000000x0A13EE122D120A13301200000000000000000000000x0D121D126112251320000D129512611225130000000x0D132A12AD129B12000000000000000000000000000x1012191235120000000000000000000000000000000x1313F0129B120000000000000000000000000000000x15129512F5129B12000000000000000000000000000x1512ED12CB129512000000000000000000000000000x18120D13DB127512000000000000000000000000000x19122D1225130000000000000000000000000000000x1912341200000000000000000000000000000000000x1912DA1243120000000000000000000000000000000x1B120B12ED129B12000000000000000000000000000x1B12AD1230129E1200000000000000000000000000It will "work" with a binary collation, but I want resutls to sort lexicographically. I was using SQL_Latin1_General_CP_CS_AS. |
|
|
|
|
|
|