In Microsoft SQL Server how can I handle data in some language other than English

  • I am web developer who had been working till date in english language based sites. Now I am required to make a site in French and Italian language. Can sombody guide me how to store and manage data in languages other than English in Microsoft SQL Server

  • Use Unicode where ever possible.

    In ASP / ASP.Net or your webpages, set the page encoding to Unicode (UTF-8). Your web pages and web browser will then talk in Unicode. Check the documentation for the programming environment you are working in for how to set your code page / page set / encoding to UTF-8.

    Use NVARCHAR / NCHAR data types in your database tables and sprocs for strings. Varchar is for english stuff, NVarchar is Unicode.

    If you create ad-hoc sql statements, prefix your strings with N to specify unicode matching. IE: select * from myproducts where name = N'My Unicode Product Name'

    If you remember to use Nvarchar data types for your database / application you will be able to support any language. Your same tables / sprocs / pages will work in English, Japanese, Chinese, Italian, French, etc.

    Remember though that NVarchar columns are double-byte characters, that is a NVarchar(64) column actually takes 128 bytes storage (64 x 2), even for english text.


    Julian Kuiters
    juliankuiters.id.au

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

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