小
小胡1
Unregistered / Unconfirmed
GUEST, unregistred user!
下面是PowerTCP Server的说明:
When Data is specified as a String, all bytes are converted to 16-bit Unicode
characters according to the default ANSI code page specified on the system.
If the code page is not ASCII, multi-byte characters convert to single Unicode
characters. This is not as efficient as receiving into a large Byte array.
The most efficient transfer is possible when a large global Byte array is
allocated once, and all network data is repeatedly read into the same
array (a single memory transfer takes place directly from the system
buffers into the global Byte array allocated in the user's application).
我在用ClientSocket发送汉字的字符到PowerTCP Server时接收到的汉字有时正常有
时乱码(好像有的汉字被认成控制字符啦?).应该怎样发送和接收呢???? 是不是此控件
不支持中文呢??
下边是关于发送字符串方面的说明:
Data can be provided in two ways:
A String is converted from Unicode to US_ASCII according to the default code
table. Each 16-bit Unicode character is translated to an 8-bit byte.
This is a convenient coding mechanism for many environments,
but is not as efficient as sending a Byte array.
A Byte or Byte array is sent as presented, with no translation.
If LimitCount is specified and is greater than 0, then the number of
bytes sent is limited to LimitCount. For example, if a Byte array of
length 8192 contains only 100 bytes that the user wants to send,
then a LimitCount of 100 can be used to override the default behavior,
which would be to send the entire 8192 bytes (the length of the array).
This method can be invoked as blocking or non-blocking, depending
on the value of the Timeout property. When performing blocked method
calls, the Blocked property may be checked to verify the control
is not busy executing another method. If the Timeout property is positive,
this method blocks until the system accepts the data
for sending (the SendBufferCount property decrements to 0) or
the timeout period expires.
Any IAC character (ASCII 255) is doubled up according to
the protocol specification. Any CR character (ASCII 13) not followed
by a LF character (ASCII 10) has a NULL inserted after it according to
the protocol specification. The reciprocal operation is applied to
received data. The user should use CR/LF (ASCII 13 and ASCII 10) to
terminate each line.
When Data is specified as a String, all bytes are converted to 16-bit Unicode
characters according to the default ANSI code page specified on the system.
If the code page is not ASCII, multi-byte characters convert to single Unicode
characters. This is not as efficient as receiving into a large Byte array.
The most efficient transfer is possible when a large global Byte array is
allocated once, and all network data is repeatedly read into the same
array (a single memory transfer takes place directly from the system
buffers into the global Byte array allocated in the user's application).
我在用ClientSocket发送汉字的字符到PowerTCP Server时接收到的汉字有时正常有
时乱码(好像有的汉字被认成控制字符啦?).应该怎样发送和接收呢???? 是不是此控件
不支持中文呢??
下边是关于发送字符串方面的说明:
Data can be provided in two ways:
A String is converted from Unicode to US_ASCII according to the default code
table. Each 16-bit Unicode character is translated to an 8-bit byte.
This is a convenient coding mechanism for many environments,
but is not as efficient as sending a Byte array.
A Byte or Byte array is sent as presented, with no translation.
If LimitCount is specified and is greater than 0, then the number of
bytes sent is limited to LimitCount. For example, if a Byte array of
length 8192 contains only 100 bytes that the user wants to send,
then a LimitCount of 100 can be used to override the default behavior,
which would be to send the entire 8192 bytes (the length of the array).
This method can be invoked as blocking or non-blocking, depending
on the value of the Timeout property. When performing blocked method
calls, the Blocked property may be checked to verify the control
is not busy executing another method. If the Timeout property is positive,
this method blocks until the system accepts the data
for sending (the SendBufferCount property decrements to 0) or
the timeout period expires.
Any IAC character (ASCII 255) is doubled up according to
the protocol specification. Any CR character (ASCII 13) not followed
by a LF character (ASCII 10) has a NULL inserted after it according to
the protocol specification. The reciprocal operation is applied to
received data. The user should use CR/LF (ASCII 13 and ASCII 10) to
terminate each line.