Keyword expansion

Keyword expansion does not occur in source files that are treated as binary because of the appearance of null bytes, Control-Z, or other non-printable characters.

The strings inserted by keyword expansion are stored in the database as UTF-8. When read into Java™ as an attribute value, the string is converted to Java internal encoding (UTF-16). The string value is then converted to the source file encoding and then inserted into the source file during keyword expansion.

If the value can be converted between the different encodings and an encoding is specified for the source file, keyword expansion works. If encoding is not specified, the file uses CP1252 as encoding, which limits the usability of the keyword expansion. Additionally, if the encoding used for the source file cannot encode the keyword, the keyword expansion is skipped.

However, if your source files use any encoding other than UTF-8, and the values substituted for the keywords include Asian or other non-ASCII characters, then keyword expansion generates incorrect results.


Feedback