Changing CodePage on a 2000-Client using NF

How do I change codepage on a win. 2000 client using NF. I know you can do it in regedit, but where in regedit? Edited by - kentt on 2001 Jun 27 14:36:35

hi, actually you can use region setting in control panel to change the code page. I don’t like to use regedit as you will be in big trouble if you do anything wrong.

quote:


Originally posted by richtsang: hi, actually you can use region setting in control panel to change the code page. I don’t like to use regedit as you will be in big trouble if you do anything wrong.


It’s not enough just changing (Regional Settings) National. The chr. in NF is still not showing æøå. But it does on a Win98.

kent, I think I should explain more in detail. First, I assume the user is using W2k Professional. Second, can the language stting in the system as default. Then the system code page will change to the code page as default. Richard

It is still not enough to use the regional settings. Regedit is still required to set the codepage. Search for OEMCP and you will find it. Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu Email:cbradney@deloitte.com.au

are you getting a code page error when you are trying to use navision 2.60 with SQL 2000. If so then you should upgrade you clients to use 2.60E (or 2.60D) and you problems will disapear. Sometime the errors you get have nothing to do with the problem so it helps to say what your problem is. Paul Baxter

The solution is change the key in Regedit: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage\ where OEMCP should be changed.

Paul, I think Kent may be talking not particularly about SQL client but generally. This happens, when for e.g. you have NF server on NT, clients running NF Client on Win 95/98. Let us say that these clients are feeding Navision data in Korean characters, for example. To see successfully the data already in the system from NF client in W2K Professional workstations, you MUST install the relevant codepage, as W2K multilanguage is UNICODE based. To do this, you go to the W2K workstation, regional settings. Under General Tab, at the bottom half you have the “Language Settings for the System” option and a “Set Default…” button. Here I must click and in the ensuing screen select Korean as the code page setting. Then from the W2K workstation I can connect to the NT Server with data in Korean characters input from Win95/98 clients as well as input new data in the correct character set. I hope this is what Kent was looking for. Regds

Yes OK, its just that i’ve seen the codepage error in Navision using SQL too many times and people trying to change to code page 0??? Paul Baxter

Don’t use regedit. Use Regional Settings (NT) or Regional Options (2k) and click the Default settings button. Changing the current locale settings is not enough since the Win32 ANSI/OEM conversion functions respect the default code page. For 95/98 this is set in config.sys, country keyword.

Changing regional settings is not enough either… It doesnt always work, especially on NT4/Win9x. You must use regedit. You will find this on systems where the default codepage is not the one that the SQL server is running on. eg… set SQL to CP 850 as the first webshop docs said it should be… Then connect to it with a CP437 Win9x/NT4 client. I have found this with W2k in 2 cases as well (even with the regional settings changed). Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu Email:cbradney@deloitte.com.au

Yep. I can confirm what Craig said. Regedit IS a must. OEMCP should be changed, but there is another key which, if exists /e.g. if using MS SQL 2000/, should be set accordingly - this is the ACP key. Here we should use cyrillic code page, which is tough job even with standard Win applications which communicate with MS SQL. But if you need a proper Dos to Win character conversion /and this is absolutely a must with Navision/ the OEMCP and ACP /for MS SQL 2000/ keys should be set.

Financials/Attain requires that the ANSI or OEM code page on the client machine connecting to SQL Server (2000 or 7) matches the code page of the database collation (SQL 2000,Attain client) or default server collation (SQL 7,Financials client). It is not necessary to use an oem code page (850 or otherwise), but just that the above requirement is met. It is preferable to use a collation on the server that is based on an ANSI code page (1250, 1252, 1254 etc) that matches your client’s ANSI code page. OEM code pages have been suggested in the past because they more closely match a given Navision Server oem code page set up in the chartable of the stx file. It is not necessary to use regedit to change an NT/Win2000 client code page. The System Locale setting does this job (via the Set default…) button. Note that this is NOT the current locale setting. I am doing this very test on a regular basis, with OEM/ANSI conversions under win32. Please try that to be convinced.

Well please explain why then since our SQL server has run since the days of beta versions of 2.5 on CP 850, from that version if the CP of the client machine was not 850 then you get CP errors. You definitely do get errors with CP on W2K/NT4/Win9x. Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu Email:cbradney@deloitte.com.au

If you run with a CP 850 sort order on SQL Server 7.0 (back in the 2.5 days 7.0 was the only option), then your client OEM code page must also be 850, since the client ANSI code page would not match (you probably use ANSI 1252). (OEM and ANSI code pages use mutually exclusive IDs except where the DBCS code pages are concerned (936, 949, 950 etc). Here they are both ANSI and OEM IDs). NF Versions before 2.6C did not support SQL Server 2000 and an attempt to run against it would give a code page error (which has now changed slightly in Attain), stating code page 0, since SQL Server 2000 changed system tables that yielded sort order and code page info. From 2.6C these changes were addressed so the rules I stated in the provious post applied for 2000 as they had for 7.0. If I installed my SQL Server with a sort order (collation) based on ANSI 1252, then my client ANSI code page would have to match this, and not the OEM (e.g. 850). The rules still apply. From Attain onwards, the collation (and therefore code page) can be set at the database level, e.g. I can make one db based on 850 and another on 1252. If my client is running OEM 850 and ANSI 1252 (this is actually my set up most of the time) I can use both databases. The code page check must still apply, but in this case it is against the database not the server collation. In all cases, the code page on the client that is important is the System code page as I said, which is easily setable in the UI without resorting to RegEdit, though RegEdit may be more fun. (In win98 it is driven by config.sys).

Be brave… the registry is there to be edited… thats why they give you regedit.exe! :slight_smile: Theres all sorts of cool stuff in there to play with! Craig Bradney Technical Manager Navision Solutions & Services, Deloitte Touche Tohmatsu Email:cbradney@deloitte.com.au