Mike Chabot wrote:
> insert Unicode into these columns without any problems.

you really can't insert "unicode" into non "N" columns in sql server & 
get unicode back. i'd guess you're actually inserting data that the 
driver or db is interpreting as non-unicode.

> Smart quotes: "" ''
> Where am I wrong in my understanding of char and varchar columns?

you're not, but i think you're wrong about the encoding. the driver/db 
is interpreting those smart quotes as part of the windows codepage which 
is a superset of latin-1 (iso-8859-1) and not unicode (ucs-2). if you 
try something like the following code, you'll see the smart quotes get 
inserted & selected ok but that tibetan char (3840) will get garbaged 
(will render as a "?"). this happens even if you use unicode hinting 
values(N'#z#') to try to force the db to use unicode.

<cfset z=chr(8220)&chr(8221)&chr(3840)&chr(8216)&chr(8217)>
<cfquery name="i" datasource="lab">
        SET NOCOUNT ON
        insert testQuotes(textData)
        values('#z#')
        SELECT lastID=@@IDENTITY
        SET NOCOUNT OFF
</cfquery>

<cfquery name="g" datasource="lab">
        SELECT textData
        FROM testQuotes
        WHERE id=#i.lastID#
</cfquery>

<cfoutput>#g.textData#</cfoutput>
<br>
<cfif g.textData EQ z>
equal
<cfelse>
not equal               
</cfif>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197573
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to