summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <ggayed>2002-10-28 19:39:00 +0000
committerGrant Gayed <ggayed>2002-10-28 19:39:00 +0000
commit8aaabcae40502527cd7df1975e9561d0e80a99b1 (patch)
tree8b5d386527a2f35db71205f6ed24bcb472e297b0
parent88066eef2acb9dce4f821fe7fcbdf6631e015e7f (diff)
downloadeclipse.platform.swt-8aaabcae40502527cd7df1975e9561d0e80a99b1.tar.gz
eclipse.platform.swt-8aaabcae40502527cd7df1975e9561d0e80a99b1.tar.xz
eclipse.platform.swt-8aaabcae40502527cd7df1975e9561d0e80a99b1.zip
24693
-rwxr-xr-xbundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/internal/Converter.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/internal/Converter.java b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/internal/Converter.java
index af9c1d5f48..6ded657338 100755
--- a/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/internal/Converter.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/motif/org/eclipse/swt/internal/Converter.java
@@ -253,7 +253,13 @@ public static byte [] wcsToMbcs (String codePage, char [] buffer, boolean termin
int [] outBuf = {ptr2};
int [] outBytesLeft = {outBytes};
OS.memmove (ptr1, buffer, inBytes);
- int result = OS.iconv (cd, inBuf, inBytesLeft, outBuf, outBytesLeft);
+ while (inBytesLeft [0] > 0) {
+ OS.iconv (cd, inBuf, inBytesLeft, outBuf, outBytesLeft);
+ if (inBytesLeft [0] != 0) {
+ inBuf [0] += 2;
+ inBytesLeft [0] -= 2;
+ }
+ }
outBytes = outBuf [0] - ptr2;
mbcs = new byte [outBytes];
OS.memmove (mbcs, ptr2, outBytes);