<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: csutil/csunicode.h Source File (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>csutil/csunicode.h</h1><a href="csunicode_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2003 by Frank Richter</span> <a name="l00003"></a>00003 <span class="comment"></span> <a name="l00004"></a>00004 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00005"></a>00005 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00006"></a>00006 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00007"></a>00007 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00010"></a>00010 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00011"></a>00011 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00012"></a>00012 <span class="comment"> Library General Public License for more details.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00015"></a>00015 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00016"></a>00016 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00017"></a>00017 <span class="comment">*/</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_CSUNICODE_H__</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_CSUNICODE_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="cssysdef_8h.html" title="This file should be #included before any other Crystal Space header files.">cssysdef.h</a>"</span> <a name="l00030"></a>00030 <a name="l00031"></a>00031 <span class="preprocessor">#if !defined(CS_WCHAR_T_SIZE)</span> <a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor"># error Unknown wchar_t size.</span> <a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#elif (CS_WCHAR_T_SIZE != 1) && \</span> <a name="l00034"></a>00034 <span class="preprocessor"> (CS_WCHAR_T_SIZE != 2) && \</span> <a name="l00035"></a>00035 <span class="preprocessor"> (CS_WCHAR_T_SIZE != 4)</span> <a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor"># error Unsupported wchar_t size.</span> <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span> <a name="l00038"></a>00038 <span class="preprocessor"></span> <a name="l00040"></a><a class="code" href="group__util.html#g60f3213e4468d7d223f3a27ad792ad38">00040</a> <span class="keyword">typedef</span> <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> <a class="code" href="group__util.html#g60f3213e4468d7d223f3a27ad792ad38" title="A single char in a UTF8 encoded string.">utf8_char</a>; <a name="l00042"></a><a class="code" href="group__util.html#g02506e0f0963f4590ed154373a24f43f">00042</a> <span class="keyword">typedef</span> <a class="code" href="group__util.html#g05f6b0ae8f6a6e135b0e290c25fe0e4e" title="unsigned 16-bit integer (0..65 535)">uint16</a> <a class="code" href="group__util.html#g02506e0f0963f4590ed154373a24f43f" title="A single char in a UTF16 encoded string.">utf16_char</a>; <a name="l00044"></a><a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070">00044</a> <span class="keyword">typedef</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> <a class="code" href="group__util.html#g47e911f87ff568b2779f26cf226f5070" title="A single char in a UTF32 encoded string.">utf32_char</a>; <a name="l00045"></a>00045 <a name="l00048"></a>00048 <a name="l00049"></a><a class="code" href="group__util.html#gf3c9a65d5c394bfd305e620ef99351bb">00049</a> <span class="preprocessor">#define CS_UC_CHAR_REPLACER 0xFFFD</span> <a name="l00051"></a><a class="code" href="group__util.html#gbe176209ca326b10e4474bcbae2f55da">00051</a> <span class="preprocessor">#define CS_UC_INVALID 0xFFFF</span> <a name="l00053"></a><a class="code" href="group__util.html#g798426465e5f6990fab5a9db764668b0">00053</a> <span class="preprocessor">#define CS_UC_BOM 0xFFFE</span> <a name="l00055"></a><a class="code" href="group__util.html#g5e76da15993612b523f18deee6e40186">00055</a> <span class="preprocessor">#define CS_UC_LAST_CHAR 0x10FFFF</span> <a name="l00056"></a>00056 <span class="preprocessor"></span> <a name="l00058"></a><a class="code" href="group__util.html#g506d88b895df510ebcffba6d5acab4ac">00058</a> <span class="preprocessor">#define CS_UC_IS_SURROGATE(C) (((C) & 0xFFFFF800) == 0x0000D800)</span> <a name="l00060"></a><a class="code" href="group__util.html#gc8cdcb503070d89ec9b289a26925743e">00060</a> <span class="preprocessor">#define CS_UC_IS_HIGH_SURROGATE(C) (((C) & 0xFFFFFC00) == 0x0000DC00)</span> <a name="l00062"></a><a class="code" href="group__util.html#gd381d5d932e71207fc276acbfaa972f5">00062</a> <span class="preprocessor">#define CS_UC_IS_LOW_SURROGATE(C) (((C) & 0xFFFFFC00) == 0x0000D800)</span> <a name="l00063"></a>00063 <span class="preprocessor"></span> <a name="l00065"></a><a class="code" href="group__util.html#gaa6e26882081c80c2723dec47e5afdb3">00065</a> <span class="preprocessor">#define CS_UC_IS_NONCHARACTER(C) (((C) == CS_UC_INVALID) || \</span> <a name="l00066"></a>00066 <span class="preprocessor"> ((C) == CS_UC_BOM) || \</span> <a name="l00067"></a>00067 <span class="preprocessor"> (((C) >= 0xFDD0) && ((C) <= 0xFDEF)) \</span> <a name="l00068"></a>00068 <span class="preprocessor"> || ((C) > CS_UC_LAST_CHAR))</span> <a name="l00069"></a>00069 <span class="preprocessor"></span> <a name="l00071"></a><a class="code" href="group__util.html#g7a22f5b867ae1a13638739a242ccd588">00071</a> <span class="preprocessor">#define CS_UC_CHAR_HIGH_SURROGATE_FIRST 0xD800</span> <a name="l00073"></a><a class="code" href="group__util.html#ge3e2a4d60f4893dfd1293f3439bc234b">00073</a> <span class="preprocessor">#define CS_UC_CHAR_HIGH_SURROGATE_LAST 0xDBFF</span> <a name="l00075"></a><a class="code" href="group__util.html#g37ddcd2eb58d721be6531cc04691eafc">00075</a> <span class="preprocessor">#define CS_UC_CHAR_LOW_SURROGATE_FIRST 0xDC00</span> <a name="l00077"></a><a class="code" href="group__util.html#g6a8bcc7859ba164607d0623e6075038f">00077</a> <span class="preprocessor">#define CS_UC_CHAR_LOW_SURROGATE_LAST 0xDFFF</span> <a name="l00078"></a>00078 <span class="preprocessor"></span> <a name="l00083"></a>00083 <span class="preprocessor">#endif</span> </pre></div><hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>