OSQL and Code Page Settings

Credit: Carl B. (SQL Server Central, Link)

In SQL Server 2000, when using OSQL it is difficult to work with import files that are in different encoding. Because when importing OSQL tends to take the local code page settings and applies it to input file. Only way I found to get around that issue was to save the file as unicode and then import it. Which works; but when working on large import files this turns out to be a headach.

Carl found following registery settings can be changed to achive same affect; as recommend by him becareful about changing them though :)>. I would change them back after doing the work.

-> OEMCP: Changing its value from 850 to 1252.

-> 850: Changing it’s value from c_850.nls to c_1252.nls.

Interseting bit of info .. as Carl warns use it carefully, we wouldn’t want something else to blow up :).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.