diff options
author | Silenio Quarti <ssq> | 2001-08-29 21:12:35 +0000 |
---|---|---|
committer | Silenio Quarti <ssq> | 2001-08-29 21:12:35 +0000 |
commit | e29ca99d663ea45a45997469b2ad973b95cb79d0 (patch) | |
tree | 918630094138f91db7ec51c685214c21df86ca25 /bundles/org.eclipse.swt/Eclipse SWT Printing | |
parent | 6f4503090b247795a19e8669b7c6bcd55ff1eb17 (diff) | |
download | eclipse.platform.swt-e29ca99d663ea45a45997469b2ad973b95cb79d0.tar.gz eclipse.platform.swt-e29ca99d663ea45a45997469b2ad973b95cb79d0.tar.xz eclipse.platform.swt-e29ca99d663ea45a45997469b2ad973b95cb79d0.zip |
ssq - codepage work
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Printing')
-rwxr-xr-x | bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java index 86e53a1b83..a59c5d6b84 100755 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/win32/org/eclipse/swt/printing/Printer.java @@ -186,6 +186,7 @@ public Printer(PrinterData data) { */
protected void create(DeviceData deviceData) {
data = (PrinterData)deviceData;
+ /* Use the character encoding for the default locale */
byte[] driver = Converter.wcsToMbcs(0, data.driver, true);
byte[] device = Converter.wcsToMbcs(0, data.name, true);
int lpInitData = 0;
@@ -272,6 +273,7 @@ public boolean startJob(String jobName) { int hHeap = OS.GetProcessHeap();
int lpszDocName = 0;
if (jobName != null && jobName.length() != 0) {
+ /* Use the character encoding for the default locale */
byte [] buffer = Converter.wcsToMbcs(0, jobName, true);
lpszDocName = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length);
OS.MoveMemory(lpszDocName, buffer, buffer.length);
@@ -279,6 +281,7 @@ public boolean startJob(String jobName) { }
int lpszOutput = 0;
if (data.printToFile && data.fileName != null) {
+ /* Use the character encoding for the default locale */
byte [] buffer = Converter.wcsToMbcs(0, data.fileName, true);
lpszOutput = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, buffer.length);
OS.MoveMemory(lpszOutput, buffer, buffer.length);
|