Windows 2000 Problem

2 отговора 109 прегледа
#1

Windows 2000 Problem

Някой да е имал проблем при копиране на текст на кирилица от Notepad под Windows 2000, когато клавиатурата е на [EN].
Когато клавиатурата е на [BG] проблем няма.

т.е Получавам '?????????'

Data: THandle;
strTemp:string;

Clipboard.Open;
Data := GetClipboardData(CF_TEXT);

if Data <> 0 then
begin

strTemp:=PChar(GlobalLock(Data)); // Получавам '?????????'
GlobalUnlock(Data);

end;

Clipboard.Close;

Отговор
в отговор на P #2

Re: Windows 2000 Problem

The data is a handle to the locale identifier associated with text in the clipboard. When you close the clipboard, if it contains CF_TEXT data but no CF_LOCALE data, the system automatically sets the CF_LOCALE format to the current input language. You can use the CF_LOCALE format to associate a different locale with the clipboard text.
An application that pastes text from the clipboard can retrieve this format to determine which character set was used to generate the text.

Note that the clipboard does not support plain text in multiple character sets. To achieve this, use a formatted text data type such as Rich Text Format (RTF) instead.

Windows NT/2000/XP: The system uses the code page associated with CF_LOCALE to implicitly convert from CF_TEXT to CF_UNICODETEXT. Therefore, the correct code page table is used for the conversion.

Отговор
в отговор на P #3

Re: Windows 2000 Problem

И PGP-то го има тоя проблем под XP... много неприятно.

Отговор