Microsoft SDK for Java

LocalStringToJavaString

The LocalStringToJavaString method of the SystemX class contains the following signatures.

LocalStringToJavaString(String local)
LocalStringToJavaString(byte B[])
LocalStringToJavaString(char B[])
LocalStringToJavaString(byte B[], int off, int len)
LocalStringToJavaString(char B[], int off, int len)
LocalStringToJavaString(byte local)

LocalStringToJavaString(String local)

Converts a string from a local code page to Unicode.

Syntax

public static String LocalStringToJavaString(String local);

Return Value

Returns the Unicode representation of the string.

Parameters

local The local code page string.

Remarks

Java internally uses the Unicode encoding system. Unfortunately, this means more than just using 16-bits per character in the local code page. For example, character 149 in the Microsoft® Windows® code page used in the United States (code page 1252) is a bullet. This is not true for the Macintosh or for many UNIX systems. So, if you make this a hard-coded value, the bullet does not appear correctly on other platforms.

LocalStringToJavaString(byte B[])

Converts a byte array from a local code page to an Unicode-filled character array.

Syntax

public static char[] LocalStringToJavaString(byte B[]);

Return Value

Returns the Unicode representation of the array.

Parameters

B The local code page string.

LocalStringToJavaString(char B[])

Converts a char array from a local code page to an Unicode-filled character array.

Syntax

public static char[] LocalStringToJavaString(char B[]);

Return Value

Returns the Unicode representation of the array.

Parameters

B The local code page array.

LocalStringToJavaString(byte B[], int off, int len)

Converts a part of a byte array from a local code page to a Unicode-filled character array.

Syntax

public static char[] LocalStringToJavaString(byte B[], int off, int len);

Return Value

Returns the Unicode representation of the array.

Parameters

B The local code page array.
off The starting point within the array.
len The length of the segment to convert.

LocalStringToJavaString(char B[], int off, int len)

Converts a part of a character array from a local code page to an Unicode-filled character array.

Syntax

public static char[] LocalStringToJavaString(char B[], int off, int len);

Return Value

Returns the Unicode representation of the array.

Parameters

B The local code page array.
off The starting point within the array.
len The number of characters to convert.

LocalStringToJavaString(byte local)

Converts a byte from a local code page to a Unicode character.

Syntax

public static char LocalStringToJavaString(byte local);

Return Value

Returns the Unicode representation of the array.

Parameters

local The local code page string.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.