File: encoding-rule.html

package info (click to toggle)
ruby-bluefeather 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 632 kB
  • ctags: 167
  • sloc: ruby: 4,195; makefile: 7
file content (47 lines) | stat: -rw-r--r-- 1,955 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Encoding Rule - BlueFeather Manual</title>
<link rel="stylesheet" type="text/css" href="black.css" />
</head>
<body>

<div class="back"><a href="index.html">BlueFeather Manual</a></div>

<h1 id="bfheader-06a0303193523282130e680a0d2f058f">Encoding Rule</h1>

<ul>
<li><a href="#bfheader-84fb6cab35fe13eef58167e5cbcf8fe9" rel="toc">1. Converting to html part</a></li>
<li><a href="#bfheader-db7b980112a4cd59806c96e2ad4cbe9e" rel="toc">2. Converting to html document</a></li>
</ul>

<h2 id="bfheader-84fb6cab35fe13eef58167e5cbcf8fe9">1. Converting to html part</h2>

<p>(converting *.bftext files, parsing by <code>parse_text</code> or others.)</p>

<p>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.</p>

<p>When you use <code>bluefeather</code> command, it is based on -e (--encoding) option. Default is UTF-8.</p>

<h2 id="bfheader-db7b980112a4cd59806c96e2ad4cbe9e">2. Converting to html document</h2>

<p>(converting *.bfdoc files, parsing by <code>parse_document</code> or others.)</p>

<p>BlueFeather uses the following order.</p>

<ol>
<li>Encoding header of document metadata (PRIMARY)</li>
<li>Specified encoding at convert</li>
<li>UTF-8</li>
</ol>

<p>If you want to know about encoding header, see the <a href="metadata-reference.html">Metadata reference</a>.</p>

<p>You can specify encoding.
If you use <code>bluefeather</code> command, you must use -e (--encoding) option for it.
If you use with <a href="class-reference.html#parse_document"><code>parse_document</code></a> or <a href="class-reference.html#parse_document"><code>parse_document_file</code></a>, you must use 2nd argument of these methods for it.</p>

</body>
</html>