character encoding

  • Hi

    I have a user who is using data from my database for a webportal.  One of my tables had a field that was type NText.  The technology he is using couldn't cope with NText so i changed the data type to nvarchar instead.  The user is now getting some superfluous characters coming back as part of the data in the field e.g. '12\r\n' where a space appears if looking at the data through something like Query Analyser.  He was asking if I could change the character encoding to Unicode.

    I thought that datatypes like Nvarchar were unicode anyway but I guess the fact that I changed the type might mean that I need to explicitly declare it as unicode.  Does anyone know if this is the case?

    thanks.

  • Encoding is not done in the RDBMS what is done is setting collation in 2000 you can set collation on the column level, while in 2005 you can set the collation even in the DML statements.  If you still have specific questions about collations post again because the Latin alphabet is 26 letters while Asian languages like Chinese and Japanese is more than 2000 characters. The links below are for 2005 but most is relevant to 2000. Hope this helps.

    http://msdn2.microsoft.com/en-us/library/ms144250.aspx

    http://msdn2.microsoft.com/en-us/library/ms180175.aspx

    Kind regards,
    Gift Peddie

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply