The SWORD Project
1.9.0.svnversion
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
scsuutf8.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* scsuutf8.h - class SCSUUTF8: an Encoding filter which converts SCSU to UTF8
4
*
5
* $Id: scsuutf8.h 3786 2020-08-30 11:35:14Z scribe $
6
*
7
* Copyright 2001-2013 CrossWire Bible Society (http://www.crosswire.org)
8
* CrossWire Bible Society
9
* P. O. Box 2528
10
* Tempe, AZ 85280-2528
11
*
12
* This program is free software; you can redistribute it and/or modify it
13
* under the terms of the GNU General Public License as published by the
14
* Free Software Foundation version 2.
15
*
16
* This program is distributed in the hope that it will be useful, but
17
* WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
* General Public License for more details.
20
*
21
*/
22
23
#ifndef SCSUUTF8_H
24
#define SCSUUTF8_H
25
26
#include <
swfilter.h
>
27
28
#ifdef _ICU_
29
#include <unicode/utypes.h>
30
#include <unicode/ucnv.h>
31
#include <unicode/uchar.h>
32
#endif
33
34
SWORD_NAMESPACE_START
35
38
class
SWDLLEXPORT
SCSUUTF8
:
public
SWFilter
{
39
private
:
40
#ifdef _ICU_
41
UConverter* scsuConv;
42
UConverter* utf8Conv;
43
UErrorCode err;
44
#else
45
// without ICU, we'll attempt to use Roman Czyborra's SCSU decoder code
46
unsigned
char
active
;
47
bool
mode
;
48
unsigned
long
c,
d
;
49
50
static
unsigned
short
start[8];
51
static
unsigned
short
slide[8];
52
static
unsigned
short
win[256];
53
54
int
UTF8Output(
unsigned
long
,
SWBuf
* utf8Buf);
55
#endif
56
57
public
:
58
SCSUUTF8
();
59
~
SCSUUTF8
();
60
virtual
char
processText
(
SWBuf
&text,
const
SWKey
*key = 0,
const
SWModule
*
module
= 0);
61
};
62
63
SWORD_NAMESPACE_END
64
#endif
SWORD_NAMESPACE_START
#define SWORD_NAMESPACE_START
Definition:
defs.h:39
SWBuf
Definition:
swbuf.h:47
SWDLLEXPORT
#define SWDLLEXPORT
Definition:
defs.h:171
SCSUUTF8::mode
bool mode
Definition:
scsuutf8.h:47
module
SWText * module
Definition:
osis2mod.cpp:105
SCSUUTF8::d
unsigned long d
Definition:
scsuutf8.h:48
SCSUUTF8::active
unsigned char active
Definition:
scsuutf8.h:46
swfilter.h
SWFilter
Definition:
swfilter.h:45
SWModule
Definition:
swmodule.h:101
SWFilter::processText
virtual char processText(SWBuf &text, const SWKey *key=0, const SWModule *module=0)=0
SCSUUTF8
Definition:
scsuutf8.h:38
SWORD_NAMESPACE_END
#define SWORD_NAMESPACE_END
Definition:
defs.h:40
SWKey
Definition:
swkey.h:77
include
scsuutf8.h
Generated by
1.8.5