views:

513

answers:

2

I'm using the Delphi function

StringCodePage

I call it on a string returned by a COM function (Acrobat Annotation getContents - see my other posts) and it returns 0. What is 0? Ansi?

Thanks

+5  A: 

Code page 0 is CP_ACP, current Windows ANSI code page.

From Windows.pas:

{$EXTERNALSYM CP_ACP}
CP_ACP                   = 0;             { default to ANSI code page }

From MSDN:

CP_ACP

The current system Windows ANSI code page. This value can be different on different computers, even on the same network. It can be changed on the same computer, leading to stored data becoming irrecoverably corrupted. This value is only intended for temporary use and permanent storage should be done using UTF-16 or UTF-8 if possible.

gabr
A: 

It might also be useful to know that you can change it (without reinstall): http://www.mihai-nita.net/article.php?artID=20050611a

Mihai Nita