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 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Encoding Issues</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="MIME Directory Library Reference Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Overview"
HREF="overview.html"><LINK
REL="PREVIOUS"
TITLE="Example"
HREF="overview-example.html"><LINK
REL="NEXT"
TITLE="Core Reference"
HREF="core-ref.html"><STYLE
TYPE="text/css"
>.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #eeeeff;
border: solid 1px #aaaaff;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #ffeeee;
border: solid 1px #ffaaaa;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #770000;
}
.navigation a:visited {
color: #550000;
}
.navigation .title {
font-size: 200%;
}</STYLE
></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><TABLE
WIDTH="100%"
CLASS="navigation"
SUMMARY="Navigation header"
CELLPADDING="2"
CELLSPACING="2"
><TR
VALIGN="middle"
><TD
><A
ACCESSKEY="p"
HREF="overview-example.html"
><IMG
SRC="left.png"
WIDTH="24"
HEIGHT="24"
BORDER="0"
ALT="Prev"></A
></TD
><TD
><A
ACCESSKEY="u"
HREF="overview.html"
><IMG
SRC="up.png"
WIDTH="24"
HEIGHT="24"
BORDER="0"
ALT="Up"></A
></TD
><TD
><A
ACCESSKEY="h"
HREF="index.html"
><IMG
SRC="home.png"
WIDTH="24"
HEIGHT="24"
BORDER="0"
ALT="Home"></A
></TD
><TH
WIDTH="100%"
align="center"
>MIME Directory Library Reference Manual</TH
><TD
><A
ACCESSKEY="n"
HREF="core-ref.html"
><IMG
SRC="right.png"
WIDTH="24"
HEIGHT="24"
BORDER="0"
ALT="Next"></A
></TD
></TR
></TABLE
><BR
CLEAR="all"><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="OVERVIEW-ENCODING"
>Encoding Issues</A
></H1
><P
>The current vCard and iCalendar standards
([<A
HREF="bibliography.html#BIB-RFC2426"
>VCARD</A
>,
<A
HREF="bibliography.html#BIB-RFC2445"
>ICAL</A
>]) suggest the use of UTF-8
([<A
HREF="bibliography.html#BIB-RFC2279"
>UTF-8</A
>]) as default encoding for
vCard and iCalendar files. Since UTF-8 is the only portable way to
store internationalized files, it is used by default by Libmimedir
when files are saved. On loading, an UTF-8 encoding is assumed, if
the encoding is not settable in the loading function. (The various
load_from_channel functions define the encoding implicitly through
the channel's encoding.) If the input is not in UTF-8, a conversion
error will be returned.</P
><P
>The two functions
mimedir_vcard_read_list()
and
mimedir_vcal_read_list()
are special cases; they open a file, first assuming it is in UTF-8
encoding. If the file contains invalid UTF-8 sequences, a second try is
employed, using the current locale. If this fails, too, a third and final
try is made, assuming the file is in ISO-8859-15 (aka ISO Latin 9)
encoding.</P
></DIV
><TABLE
CLASS="navigation"
WIDTH="100%"
SUMMARY="Navigation footer"
CELLPADDING="2"
CELLSPACING="2"
><TR
VALIGN="middle"
><TD
ALIGN="left"
><A
ACCESSKEY="p"
HREF="overview-example.html"
><B
><<< Example</B
></A
></TD
><TD
ALIGN="right"
><A
ACCESSKEY="n"
HREF="core-ref.html"
><B
>Core Reference >>></B
></A
></TD
></TR
></TABLE
></BODY
></HTML
>
|