mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-18 22:45:23 +02:00
[367449] [dstore] allow custom encoding for data transport layer
This commit is contained in:
parent
015fe4c937
commit
0f73384cd4
2 changed files with 10 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
||||||
* David McKnight (IBM) [347412][dstore] Need an option to set TCP NODELAYACKS
|
* David McKnight (IBM) [347412][dstore] Need an option to set TCP NODELAYACKS
|
||||||
* David McKnight (IBM) [350315][dstore] regress change made for bug 305218
|
* David McKnight (IBM) [350315][dstore] regress change made for bug 305218
|
||||||
* David McKnight (IBM) - [358301] [DSTORE] Hang during debug source look up
|
* David McKnight (IBM) - [358301] [DSTORE] Hang during debug source look up
|
||||||
|
* David McKnight (IBM) - [367449] [dstore] allow custom encoding for data transport layer
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.internal.core.util;
|
||||||
|
@ -93,6 +94,10 @@ public class Sender implements ISender
|
||||||
_outFile = new PrintStream(_socket.getOutputStream());
|
_outFile = new PrintStream(_socket.getOutputStream());
|
||||||
|
|
||||||
String encoding = DE.ENCODING_UTF_8;
|
String encoding = DE.ENCODING_UTF_8;
|
||||||
|
String serverEncoding = System.getProperty("DSTORE_SERVER_ENCODING"); //$NON-NLS-1$
|
||||||
|
if (serverEncoding != null && serverEncoding.length() > 0){
|
||||||
|
encoding = serverEncoding;
|
||||||
|
}
|
||||||
|
|
||||||
OutputStreamWriter writer = new OutputStreamWriter(_socket.getOutputStream(), encoding);
|
OutputStreamWriter writer = new OutputStreamWriter(_socket.getOutputStream(), encoding);
|
||||||
_outData = new BufferedWriter(writer);
|
_outData = new BufferedWriter(writer);
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
* David McKnight (IBM) [343939][dstore][windows] DBCS3.7 DBCS characters are corrupted in Files
|
* David McKnight (IBM) [343939][dstore][windows] DBCS3.7 DBCS characters are corrupted in Files
|
||||||
* David McKnight (IBM) [350315][dstore] regress change made for bug 305218
|
* David McKnight (IBM) [350315][dstore] regress change made for bug 305218
|
||||||
* David McKnight (IBM) - [358301] [DSTORE] Hang during debug source look up
|
* David McKnight (IBM) - [358301] [DSTORE] Hang during debug source look up
|
||||||
|
* David McKnight (IBM) - [367449] [dstore] allow custom encoding for data transport layer
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.dstore.internal.core.util;
|
package org.eclipse.dstore.internal.core.util;
|
||||||
|
@ -483,6 +484,10 @@ public class XMLparser
|
||||||
{
|
{
|
||||||
String result = null;
|
String result = null;
|
||||||
String encoding = DE.ENCODING_UTF_8;
|
String encoding = DE.ENCODING_UTF_8;
|
||||||
|
String serverEncoding = System.getProperty("DSTORE_SERVER_ENCODING"); //$NON-NLS-1$
|
||||||
|
if (serverEncoding != null && serverEncoding.length() > 0){
|
||||||
|
encoding = serverEncoding;
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
result = new String(_byteBuffer, 0, offset, encoding);
|
result = new String(_byteBuffer, 0, offset, encoding);
|
||||||
|
|
Loading…
Add table
Reference in a new issue