Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Wiki Markup
            Every Java platform has a default character encoding. The available encodings are listed in the _Supported Encodings_ document \[[Encodings 2006|AA. Bibliography#Encodings 06]\]. ConversionsA conversion between characters and sequences of bytes requires a character encoding to specify the details of the conversion. Such conversions use the system default encoding in the absence of an explicitly specified encoding. When characters are converted into an array of bytes to be sent as output, transmitted across some communication channel, input, and converted back into characters, compatible encodings must be used on both sides of the conversation. Disagreement over character encodings can cause data corruption.

...

Binary data that is expected to be a valid string may be read and converted to a string by exception FIO11-EX0 of rule FIO11-J. Do not attempt to read raw binary data as character data.

Noncompliant Code Example

...

IDS13-EX0: An explicit character encoding may be omitted on the receiving side when the data was is produced by a Java application that uses the same platform and default character encoding and the data is communicated over a secure communication channel (see MSC00-J . Use SSLSockets rather than Sockets for secure data exchangefor more information).

Risk Assessment

Failure to specify the character encoding while performing file or network I/O can result in corrupted data.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f3434f2f56c23b90-62becfca-403348ff-96299fd5-2a1920727f605a58a567c13e"><ac:plain-text-body><![CDATA[

[[Encodings 2006

AA. Bibliography#Encodings 06]]

]]></ac:plain-text-body></ac:structured-macro>

...