Browse Prior Art Database

Java Code Page Indicator

IP.com Disclosure Number: IPCOM000123309D
Original Publication Date: 1998-Sep-01
Included in the Prior Art Database: 2005-Apr-04
Document File: 1 page(s) / 35K

Publishing Venue

IBM

Related People

Eldergill, E: AUTHOR [+2]

Abstract

This disclosure relates to a method for storing, in a Java file, an indicator as to the code page used in its creation. This indicator can be subsequently checked by a tool such as an editor so that code page incompatibility can be avoided. An extension of the method would cause indicators of the code page history of the file to be stored and examined in the same way.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 88% of the total text.

Java Code Page Indicator

   This disclosure relates to a method for storing, in a Java
file, an indicator as to the code page used in its creation.  This
indicator can be subsequently checked by a tool such as an editor so
that code page incompatibility can be avoided.  An extension of the
method would cause indicators of the code page history of the file to
be stored and examined in the same way.

   It is currently the case that users of Java files have no
way of knowing what code page they have been created/ edited in.
Thus a developer editing a ".java" file might inadvertently cause
code page incompatibilities, or might compile the ".java" file using
the wrong encoding class.  This is particularly a problem when
dealing with issues such as the translation of messages into
different languages, when ".java" files may be moved from machine to
machine, and part of the contents of the file may be altered and part
may not be.

   The proposed solution is to automatically store the code
page indicator in a comment in the Java file.

   This would enable files to be transferred from machine to
machine and the indicators showing their code pages would travel
with them.

   The comment would have a particular format, such as that
used by Javadoc, for example, "@encoding" (or "@codepage"), so that
tools could interrogate the file and determine its code page.

   In an extension of the method, each use of a new code page
would cause the new code page indicator to be added...