Known limitations

You might come across the following issues when you use bidirectional support.

  • If an application program reads from a file, or writes to a file, pieces of text that do not constitute a logical unit, the bidirectional layout transformations produce unexpected results. For example, an application that reads or writes characters one at a time does not benefit from the bidirectional support. This limitation is not likely to be removed in future releases.
  • When unmappable characters (characters that are not valid in the declared code page) appear in single-byte character set (SBCS) data, they might cause previous and following data to be transformed independently from one another, which can lead to unexpected results.
  • When an application reads or writes a unit of text (a line for example) that crosses the boundary between buffers that are used by the input or output file, the bidirectional transformation might be done independently on the part of the text unit that is in each buffer, leading to unexpected results. When the file is not too large, you can avoid this problem by setting the buffer size to a value that is sufficient to contain the whole file. For example, you can specify the buffer size when you construct a BufferedInputStream or a BufferedOutputStream object.