diff --git a/Docs/src/history.but b/Docs/src/history.but index 67ec5fc4..ef859a5a 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -20,7 +20,9 @@ Unicode is now the default. \b Fixed Unicode compiler crash (\W{http://sf.net/p/nsis/bugs/1254}{bug #1254}, \W{http://sf.net/p/nsis/patches/300}{patch #300}) -\b Fixed !addplugindir relative path bug (\W{http://sf.net/p/nsis/bugs/1264}{bug #1264} +\b Fixed !addplugindir relative path bug (\W{http://sf.net/p/nsis/bugs/1264}{bug #1264}) + +\b Fixed StrClb Unicode bug (\W{http://sf.net/p/nsis/patches/302}{patch #302}) \S2{} Translations diff --git a/Include/StrFunc.nsh b/Include/StrFunc.nsh index b995b639..b0448c0c 100644 --- a/Include/StrFunc.nsh +++ b/Include/StrFunc.nsh @@ -382,7 +382,9 @@ o-----------------------------------------------------------------------------o ;Step 2: Allocate global heap StrLen $2 $0 IntOp $2 $2 + 1 + !if "${NSIS_CHAR_SIZE}" > 1 IntOp $2 $2 * ${NSIS_CHAR_SIZE} + !endif System::Call 'kernel32::GlobalAlloc(i 2, i r2) p.r2' ;Step 3: Lock the handle @@ -395,14 +397,22 @@ o-----------------------------------------------------------------------------o System::Call 'kernel32::GlobalUnlock(p r2)' ;Step 6: Set the information to the clipboard + !if "${NSIS_CHAR_SIZE}" > 1 + System::Call 'user32::SetClipboardData(i 13, p r2)' + !else System::Call 'user32::SetClipboardData(i 1, p r2)' + !endif StrCpy $0 "" ${ElseIf} $1 == "<" ;Get ;Step 1: Get clipboard data - System::Call 'user32::GetClipboardData(i 1) p .r2' + !if "${NSIS_CHAR_SIZE}" > 1 + System::Call 'user32::GetClipboardData(i 13)p.r2' + !else + System::Call 'user32::GetClipboardData(i 1)p.r2' + !endif ;Step 2: Lock and copy data (kichik's fix) System::Call 'kernel32::GlobalLock(p r2) t .r0' @@ -413,7 +423,11 @@ o-----------------------------------------------------------------------------o ${ElseIf} $1 == "<>" ;Swap ;Step 1: Get clipboard data - System::Call 'user32::GetClipboardData(i 1) p .r2' + !if "${NSIS_CHAR_SIZE}" > 1 + System::Call 'user32::GetClipboardData(i 13)p.r2' + !else + System::Call 'user32::GetClipboardData(i 1)p.r2' + !endif ;Step 2: Lock and copy data (kichik's fix) System::Call 'kernel32::GlobalLock(p r2) t .r4' @@ -427,7 +441,9 @@ o-----------------------------------------------------------------------------o ;Step 5: Allocate global heap StrLen $2 $0 IntOp $2 $2 + 1 + !if "${NSIS_CHAR_SIZE}" > 1 IntOp $2 $2 * ${NSIS_CHAR_SIZE} + !endif System::Call 'kernel32::GlobalAlloc(i 2, i r2) p.r2' ;Step 6: Lock the handle @@ -440,7 +456,11 @@ o-----------------------------------------------------------------------------o System::Call 'kernel32::GlobalUnlock(p r2)' ;Step 9: Set the information to the clipboard + !if "${NSIS_CHAR_SIZE}" > 1 + System::Call 'user32::SetClipboardData(i 13, p r2)' + !else System::Call 'user32::SetClipboardData(i 1, p r2)' + !endif StrCpy $0 $4 ${Else} ;Clear