DBCS, Unicode, and Java Previous
Previous
Introduction
Introduction
Next
Next

Java DBCS / Unicode Issues

The Java language specification includes support for Unicode strings. In fact, Java expects all strings to be Unicode. However, most text editors use DBCS encoding. Therefore, most text files contain DBCS strings, not Unicode strings. This causes two different problems. First, any literal DBCS strings in your source code must somehow be converted to Unicode when compiled into class files (bytecode). Second, if your Java program reads or writes any text files, there must be some way to convert strings. Strings must be converted from DBCS to Unicode during read operations, and must be converted from Unicode to DBCS during write operations.

© 1996 Microsoft Corporation. All rights reserved.