• opc.three (4/11/2013)


    The ? marks are a dead giveaway that non-printable ANSI characters are being pushed into an ANSI column or variable (i.e. VARCHAR or CHAR). The hollow squares might be a problem if some of your characters are multi-byte Unicode characters, of which I think Japanese has a few. SQL Server (at least 2005) does not handle multi-byte character sets. SQL 2012 introduced some support for them through Collations. PS The squares could also be a simple display issue depending on what you're viewing the data with. You can always check by using the SUBSTRING() and UNICODE() or ASCII() functions to see what is actually stored.

    Hm. All the columns I have are nvarchar. I can SEE them as Japanese characters correctly using SSMS 2008 in the raw table. 2005 is hopeless, I'm convinced. However, they're both still the same in the second table.

    Using ascii() I get a value of 63. Using unicode() I get a 5 digit string.

    So, I guess I have to see if the columns that the characters are going into are ANSI, and change them to Unicode, if that's possible?

    Thanks