Article View: borland.public.delphi.nativeapi
Article #12169Re: Way to ensure OEM codepage of process
From: Peter Below (TeamB)
Date: Fri, 22 Nov 2002 18:43
Date: Fri, 22 Nov 2002 18:43
37 lines
2355 bytes
2355 bytes
In article <3dde2028$1@newsgroups.borland.com>, Pim-Jan Veenendaal wrote: > Can I set the OEM code page for a process to 850 without setting it system > wide? No. > I have a database in which the data is entered in this OEM code page. > Data can only be changed by a process using this codepage 850. Is this > possible? The database should not care what the codepage is, you only have to convert the data you feed it to the 850 codepage. The WideCharToMultibyte API function may come in handy for this purpose. > How is this codepage initialized on a system? Very platform-specific. Win95 actually used the good old config.sys file for this, if memory serves. For NT there is a registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Nls\CodePage under which there is a value named OEMCP. This defines the OEM codepage. On my system (german Win2K) it is set to 850. You will also find a value named "850" under this key. You can only use the codepage if that value is not empty. This stuff, among others, is documented in MS Knowlegebase article Q102987, by the way. -- Peter Below (TeamB) Use the newsgroup archives : http://www.mers.com/searchsite.html http://www.tamaracka.com/search.htm http://groups.google.com http://www.prolix.be
Technical Details
Message-ID:
<VA.00009667.00865721@antispam.compuserve.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-04!supernews.com!ngpeer.news.aol.com!newsfeed1.cidera.com!Cidera!news.uni-x.net!newsgroups.borland.com!not-for-mailReferences:
<3dde2028$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f94dd,bad92dafed2ec8ee X-Google-Attributes: gidf94dd,public X-Google-ArrivalTime: 2002-11-22 11:16:00 PST Date: Fri, 22 Nov 2002 19:43:34 +0100 Newsgroups: borland.public.delphi.nativeapi Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va Organization: TeamB Message-ID: <VA.00009667.00865721@antispam.compuserve.com> Subject: Re: Way to ensure OEM codepage of process From: "Peter Below (TeamB)" <100113.1101@compuXXserve.com> Reply-To: 100113.1101@compuXXserve.com References: <3dde2028$1@newsgroups.borland.com> NNTP-Posting-Host: 62.226.189.68 X-Trace: newsgroups.borland.com 1037990604 62.226.189.68 (22 Nov 2002 10:43:24 -0800) Lines: 39 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-05!sn-xit-06!sn-xit-04!supernews.com!ngpeer.news.aol.com!newsfeed1.cidera.com!Cidera!news.uni-x.net!newsgroups.borland.com!not-for-mail