in reply to multi byte character issue

I don't know how MS SQL might interact with the environment variables, but it would still be helpful if you could provide a short, runnable piece of code that you can use to reproduce the error on your end, perhaps we can spot the issue in that (for example, do you use locale; or something similar?). Also, see my node here for tips on how to help debug some Unicode issues, in particular, in this case you should use Devel::Peek's Dump to inspect the variable in question (and post that output here too).