NAV4.0, SQL Server, Reporting Services and CodePage translations

Mixing different codepages (ex. Mexican, Thai, Taiwanese (Chinese) and Danish) in one Navision/NAV4.00 SQL Server 2005 database is sure possible. And it actually works fine. As long as we stay internally in NAV.

But what when we want to integrate to other applications?

In my company we have the following setup: NAV4.00 SP3, SQL Server 2005 and Reporting Services. The problem is that since the characters for ex. Thai are not saved using SQL Servers native codepages, then they don’t display correctly in Reporting Services. The interface between our Data Store used by Reporting Services and our NAV SQL database is SSIS (SQL Server Information Services).

Do you know of any way that we can “translate” these codepages into “native” SQL codepages and this way have data displayed correctly in SQL?

Navision internally uses MS-DOS Codepages. It’s not a problem to use in same database different codepages if there are in different companies.

Try something, using that tiny tool that I have created, concert the text from Spanish Mexican to Unicode and Danish, if it works I have to convert codepages displayed texts in Reporting Services using .NET

Yes, that’s what I say. No problem internally!

So what you say is, that your tool will be able to take the tool you created, and use it in the SSIS script that holds our data storage for Reporting Services?

You don’t need my tool, that tool about 3 lines of .NET Code. The rest of code it’s just to be exposed to COM automation or to display the GUI.

You have to change SSIS to convert codepages to Unicode

When I was referring the tool was only to make a test, sorry for not correctly explained myself. [:S]

Adatp this code to your SSIS, and this code can convert a double-byte character string / file from Chinese (Taiwan) to unicode.

Encoding e = Encoding.GetEncoding( 950 );
StreamReader sr = new StreamReader( @“C:\in.txt”, e, false );
StreamWriter sw = new StreamWriter( @“C:\out.txt”, false, Encoding.Unicode );