Connect to 3.70 fro difrent codepage

How can i connect to to 3.70 on sql ( made with SQL collation 1252, Danish), with computers running Baltic codpage and want to show special letters correct?

Moved from Navision Development to Navision Technical forum.

quote:

…and want to show special letters correct?

This is trying to fit a square peg into a round hole. The reason these ugly code pages exist is because there is no way with single-byte character sets to represent and convert all language characters. When you chose cp1252, you dictated the characters available to you already. The ‘Validate Code Page’ setting in Navsion 3.70 disables code page checking between client and database. You will be ok with all characters that have the same code point (ID) in cp1252 and cp1257, but those that don’t will not convert correctly between the database and the two different clients.

quote:

This is trying to fit a square peg into a round hole.

In danish you mean that this wil never happen. Ther is no way that i will ever get Baltic special letters and Danish to be shown correctly on respective computers running on the same database?

No thats not quite right. Those code pages were created when DOS could not represent a character as a single byte. Windows uses unicode internally, that uses two characters per byte. If you use SQL2000 then every thing should display corectly, you may need to alter the language settings, using the language bar to be able to type some of the characters. You may need to make sure you have some of the languages/codepages installed. If you are using SQL7 then don’t!!! the code page of the client is tested when you try and connect and you would have to set the default location of the client machine to be the same as the SQL server. You should upgrade… Paul Baxter

I all ready did all that, and it is ok in wordpad or other office app. but in Navision Attain 3.60 the signs are shown wrong. But if i copy the wrong shown letters from navision to wordpad then they are shown correctly. I want them shown correctly in Navision too.

Paul, you’re incorrect. It is not about whether the OS supports Unicode (all editions of Windows now do), it is about what a particular application supports. The OEM (DOS) and ANSI code pages represent single-byte character sets with the limitations I outlined. The Windows OS provides Unicode support, if applications are written explicitly to use it - Navision is not. Unicode solves these issues if an application is internally using Unicode to manipulate its characters. Navision internally uses OEM and is doing OEM/ANSI conversions all over the place - it is not using Unicode for anything other than interfacing to COM and the outside world. It is strictly single-byte. There is no difference between SQL 7 and SQL 2000 regarding Unicode support - they both have the same Unicode data types. However this is irrelevant since Navision does not use these Unicode data types at all (and in fact Navision does not support 7.0 anyway). What Allan is trying to do cannot be done because there is only one active OEM and one active ANSI code page on any windows machine that dictates the outcome of all ANSI/OEM conversions, using OemToChar() and CharToOEM() which Navision is using. This is why the important setting in the ‘Regional and Language Options’ of a machine is the Advanced tab’s ‘Language for non-Unicode programs’ setting. It determines the ANSI/OEM conversions as far as Navision is concerned. As I said, only those characters whose IDs are the same in two given code pages will convert, and thereby display, correctly.

Hi again It was my first step to get this working, and from client conected directly to the SQL server it works( not for 3.60 but only from 3.70 and after). The problem was the terminal server i have been conecting through. It seems that Attain 3.70 asks for regional settings on system deafault and not user deafault, and since terminal server system deafault is always the same i need to find someone who can tell me if it’s possible to change the setting i Attain so it will look into user default instead. Allan

quote:

This is why the important setting in the ‘Regional and Language Options’ of a machine is the Advanced tab’s ‘Language for non-Unicode programs’ setting. It determines the ANSI/OEM conversions as far as Navision is concerned.

Navision cannot use the user setting because the OEM/ANSI conversions are fixed and dictated by the default setting only. The ‘Validate code page’ property is the nearest you will get to what you want.