Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Internationalization / July 2004

Tip: Looking for answers? Try searching our database.

system code page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard Otter - 07 Jul 2004 00:21 GMT
Is there user  GUI available to display the current system code page in
WIndows XP?
How about a command line utility?

And finally, how about a system API call to get the current code page?

I hope this question actually makes sense. Iwant to know what code page MFC
programs not written for UNICODE will use to translate to UICODE.

Thanks
Richard
Michael (michka) Kaplan [MS] - 07 Jul 2004 02:02 GMT
"Richard Otter" <sorry@yahoo.com> wrote...

> Is there user  GUI available to display the current system code page in
> WIndows XP?

The advanced tab of Regional and Language Options has the "Language for
non-Unicode Programs", which is the default system locale. The default
system code page is the ACP of that locale.

> How about a command line utility?

CHCP will tell you the active OEM code page (CP_OEMCP) if run with no
arguments.

> And finally, how about a system API call to get the current code page?

Well, GetACP() and GetOEMCP() should be able to help you here.

Signature

MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.

Richard Otter - 07 Jul 2004 18:38 GMT
Thanks.

So, on a default US English system, the console uses CP 437 and windows apps
use CP 1252.

I've been looking in the MSDN library and can't find a table that lists the
code page number for each platform language. Any pointers?

I'm particularly interested in testing our legacy non-unicode MFC app for
support of multi byte code pages and I'm not sure where to start. I figured
that I need to get a good understnading of how code pages are "used" by
non-unicode apps.

The biggest issue, I think, is in dealing with file names, which are always
encoded in Unicode.

Richard

> "Richard Otter" <sorry@yahoo.com> wrote...
>
[quoted text clipped - 13 lines]
>
> Well, GetACP() and GetOEMCP() should be able to help you here.
Michael (michka) Kaplan [MS] - 07 Jul 2004 20:53 GMT
"Richard Otter" <sorry@yahoo.com> wrote...

> So, on a default US English system, the console uses CP 437 and
> windows apps use CP 1252.

Yes. Much of Western Europe uses 1252 and 850 (rather than 437).

> I've been looking in the MSDN library and can't find a table that lists the
> code page number for each platform language. Any pointers?

Sites like http://www.microsoft.com/globaldev/nlsweb list them out....

> I'm particularly interested in testing our legacy non-unicode MFC app for
> support of multi byte code pages and I'm not sure where to start. I figured
[quoted text clipped - 3 lines]
> The biggest issue, I think, is in dealing with file names, which are always
> encoded in Unicode.

Yes, there are many cases where you cannot represent every item in one that
is in the other, but the roundtripping works okay because the display issue
of the "wrong glyph" is just a display issue.

Signature

MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.