Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/Converter.java')
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/Converter.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/Converter.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/Converter.java
index 6079208d46..e0f7c442a3 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/Converter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/Converter.java
@@ -1,8 +1,8 @@
package org.eclipse.swt.internal;
/*
- * Licensed Materials - Property of IBM,
- * (c) Copyright IBM Corp. 1998, 2001 All Rights Reserved
+ * (c) Copyright IBM Corp. 2000, 2001.
+ * All Rights Reserved
*/
import org.eclipse.swt.internal.win32.*;
@@ -76,6 +76,7 @@ public static char [] mbcsToWcs (int codePage, byte [] buffer) {
if (cchWideChar == 0) return EMPTY_CHAR_ARRAY;
lpWideCharStr = new char [cchWideChar];
OS.MultiByteToWideChar (cp, OS.MB_PRECOMPOSED, buffer, length, lpWideCharStr, cchWideChar);
+ return lpWideCharStr;
}
}
return lpWideCharStr;
@@ -123,7 +124,7 @@ public static byte [] wcsToMbcs (int codePage, char [] buffer, boolean terminate
*/
byte [] mbcs = new byte [(terminate) ? length + 1 : length];
for (int i=0; i<length; i++) {
- if ((buffer [i] & 0xFF) <= 0x7F) {
+ if ((buffer [i] & 0xFFFF) <= 0x7F) {
mbcs [i] = (byte) buffer [i];
} else {
/* Convert from UNICODE to DBCS */

Back to the top