BlueFeather Manual

# Encoding Rule

- 1. Converting to html part
- 2. Converting to html document

## 1. Converting to html part

(converting *.bftext files, parsing by `parse_text` or others.)

BlueFeather doesn't specially treat. If ruby 1.8.x ealier, it is based on $KCODE value then. Else if ruby 1.9.x later, it is based on encoding which String object has.

When you use `bluefeather` command, it is based on -e (--encoding) option. Default is UTF-8.

## 2. Converting to html document

(converting *.bfdoc files, parsing by `parse_document` or others.)

BlueFeather uses the following order.

1. Encoding header of document metadata (PRIMARY)
2. Specified encoding at convert
3. UTF-8

If you want to know about encoding header, see the Metadata reference.

You can specify encoding. If you use `bluefeather` command, you must use -e (--encoding) option for it. If you use with `parse_document` or `parse_document_file`, you must use 2nd argument of these methods for it.