|
|
1
3
您正在获取不透明的数据,并且似乎试图将其作为文本数据写入文件,而不转义其非文本部分(或者,您将其作为原始字节写入,然后试图将其读取为基于字符的数据,这与问题大致相同)。 无损 简单地将字节存储在文件中 对于消息中的任何基于文本的字段,如果编码很重要(我强烈建议在设计应用程序时通常避免这种问题),那么你在重放时会遇到与原始接收时相同的问题,即从源编码转换为所需的编码(希望使用完全相同的代码),因此这与重放无关。 |
|
|
2
1
这可能与Java字符串编码有关,而不是TIBRV。尽管文档中有这样的内容: Strings and Character Encodings -------------------------------------------------------------------------------- Rendezvous software uses strings in several roles: * String data inside message fields * Field names * Subject names (and other associated strings that are not strictly inside the message) * Certified delivery correspondent names * Group names (fault tolerance) All these strings (both in C and in wire format) use the character encoding appropriate to the ISO locale of the sender. For example, the United States is locale en_US, and uses the Latin-1 character encoding (also called ISO 8859-1); Japan is locale ja_JP, and uses the Shift-JIS character encoding. When two programs exchange messages within the same locale, strings are always correct. However, when a message sender and receiver use different character encodings, the receiving program must convert between encodings as needed. Rendezvous software does not convert automatically. EBCDIC For information about string encoding in EBCDIC environments, see tibrv_SetCodePages() . 所以你可能想看看机器的位置。 |
|
|
3
1
mailing list message 表明,人们对该网络协议的内部结构知之甚少。这可能会让你很难去做你想要做的事情。 也就是说,如果消息只是二进制数据块(从网络捕获),它们甚至不应该有字符集。字符集用于文本数据,这很重要,因为单个字符可以用许多不同的方式编码。二进制数据不是由字符组成的,因此不可能有这种意义上的编码。 |
|
|
4
0
对。字符集是一种将文本转换为字节流的方法,反之亦然。您的网络数据是一个字节流,因此当您将其部分解释为文本时,您(隐式或显式)使用的是字符集——问题是它是否正确。
|
|
|
5
0
从inputStream中读取字节[]内的所有内容,将字节[]写入FileOutputStream。 不应该有读者或作家参与,他们做字符转换,这是错误的。 在理解java.io之前,请远离java.nio。 |
|
|
Bard.Mus · 迁移后的数据库字符集环境 1 年前 |
|
|
David · 何时实际应用字符编码? 1 年前 |
|
|
Karlomanio · 区分两个西里尔字母字符串 2 年前 |
|
|
Gabriel Lucizano · 为什么我无法访问C中的文件 2 年前 |
|
|
Mira Kumar · 在网页上显示特殊字符 2 年前 |
|
jay.sf · 如何在pdf中使用UTF-8编码的字符矢量? 2 年前 |
|
|
Kevin Patel · UTF-8内容在Java中是否可能格式错误 2 年前 |