<html><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><title>Character sets and Unicode Byte-Order-Mark (BOM)</title><linkrel="stylesheet"href="geany.css"type="text/css"><metaname="generator"content="DocBook XSL Stylesheets V1.71.0"><linkrel="start"href="index.html"title="Geany 0.10"><linkrel="up"href="ch03.html"title="Chapter3.Usage"><linkrel="prev"href="ch03s03.html"title="General"><linkrel="next"href="ch03s05.html"title="Search, replace and go to"></head><bodybgcolor="white"text="black"link="#0000FF"vlink="#840084"alink="#0000FF"><divclass="navheader"><tablewidth="100%"summary="Navigation header"><tr><thcolspan="3"align="center">Character sets and Unicode Byte-Order-Mark (BOM)</th></tr><tr><tdwidth="20%"align="left"><aaccesskey="p"href="ch03s03.html">Prev</a></td><thwidth="60%"align="center">Chapter3.Usage</th><tdwidth="20%"align="right"><aaccesskey="n"href="ch03s05.html">Next</a></td></tr></table><hr></div><divclass="section"lang="en"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aname="charset"></a>Character sets and Unicode Byte-Order-Mark (BOM)</h2></div></div></div><divclass="section"lang="en"><divclass="titlepage"><div><div><h3class="title"><aname="id2794005"></a>Using character sets</h3></div></div></div><p>
<spanclass="application">Geany</span> provides support for detecting and converting
character sets. So you can open and save files in different character sets and
even can convert a file from a character set to another one.
To do this, <spanclass="application">Geany</span> uses the character conversion
capabilities of the GLib.
</p><p>
Only text files are supported, i.e. opening files which contain NUL-bytes may
fail. <spanclass="application">Geany</span> will try to open the file anyway but it
is likely that the file will be truncated because it can only opened up to the
first occurrence of the first NUL-byte. All characters after this position are
lost and are not written when you save the file.
</p><p>
<spanclass="application">Geany</span> tries to detect the encoding of a file while
opening it. It might be that the encoding of a file cannot be detected correctly
so you have to set manually the encoding of the file in order to display it
correctly. You can this in the file open dialog by selecting an encoding in the
drop down box or by reloading the file with the file menu item "Reload as".
The auto detection works well for most encodings but there are also some encodings
known where auto detection has its problems. Auto detecting the encoding of a file
is not easy and sometimes an encoding might be detected not correctly.
</p><p>
There are different ways to use different encodings in <spanclass="application">Geany</span>:
</p><divclass="orderedlist"><oltype="1"><li><p>Using the file open dialog</p><p>This opens the file with the encoding specified in the encoding
drop down box. If the encoding is set to "Detect from file"
auto detection will be used. If the encoding is set to
"Without encoding (None)" the file will be opened without any
character conversion and <spanclass="application">Geany</span> will
not try to auto detect the encoding(see below for more information).
</p></li><li><p>Using the "Reload as" menu item</p><p>This item reloads the current file with the specified encoding.
It can help if you opened a file and found out that a wrong
encoding was used.
</p></li><li><p>Using the "Set encoding" menu item</p><p>In contrary to the above two options, this will not change or
reload the current file unless you save it. It is useful when
you want to change the encoding of the file.</p></li></ol></div><p>
If you are unsure what a BOM is or if you do not understand where to use it,
then it is not important for you and you can safely ignore it.
</p></div><p>
</p></div></div><divclass="navfooter"><hr><tablewidth="100%"summary="Navigation footer"><tr><tdwidth="40%"align="left"><aaccesskey="p"href="ch03s03.html">Prev</a></td><tdwidth="20%"align="center"><aaccesskey="u"href="ch03.html">Up</a></td><tdwidth="40%"align="right"><aaccesskey="n"href="ch03s05.html">Next</a></td></tr><tr><tdwidth="40%"align="left"valign="top">General</td><tdwidth="20%"align="center"><aaccesskey="h"href="index.html">Home</a></td><tdwidth="40%"align="right"valign="top">Search, replace and go to</td></tr></table></div></body></html>