|
rpm-build |
6f7582 |
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
/* libmwaw
|
|
rpm-build |
6f7582 |
* Version: MPL 2.0 / LGPLv2+
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
* The contents of this file are subject to the Mozilla Public License Version
|
|
rpm-build |
6f7582 |
* 2.0 (the "License"); you may not use this file except in compliance with
|
|
rpm-build |
6f7582 |
* the License or as specified alternatively below. You may obtain a copy of
|
|
rpm-build |
6f7582 |
* the License at http://www.mozilla.org/MPL/
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
rpm-build |
6f7582 |
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
rpm-build |
6f7582 |
* for the specific language governing rights and limitations under the
|
|
rpm-build |
6f7582 |
* License.
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
* Major Contributor(s):
|
|
rpm-build |
6f7582 |
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
|
|
rpm-build |
6f7582 |
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
|
|
rpm-build |
6f7582 |
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
|
|
rpm-build |
6f7582 |
* Copyright (C) 2006, 2007 Andrew Ziem
|
|
rpm-build |
6f7582 |
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
* All Rights Reserved.
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
* For minor contributions see the git repository.
|
|
rpm-build |
6f7582 |
*
|
|
rpm-build |
6f7582 |
* Alternatively, the contents of this file may be used under the terms of
|
|
rpm-build |
6f7582 |
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
|
|
rpm-build |
6f7582 |
* in which case the provisions of the LGPLv2+ are applicable
|
|
rpm-build |
6f7582 |
* instead of those above.
|
|
rpm-build |
6f7582 |
*/
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
/* This header contains code specific to a mac file :
|
|
rpm-build |
6f7582 |
* - a namespace used to convert Mac SJIS font characters in unicode
|
|
rpm-build |
6f7582 |
*/
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
#ifndef MWAW_FONT_SJIS_CONVERTER
|
|
rpm-build |
6f7582 |
# define MWAW_FONT_SJIS_CONVERTER
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
#include <map>
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
#include "libmwaw_internal.hxx"
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
/*! \brief a namespace used to convert Mac SJIS font characters in unicode
|
|
rpm-build |
6f7582 |
*/
|
|
rpm-build |
6f7582 |
class MWAWFontSJISConverter
|
|
rpm-build |
6f7582 |
{
|
|
rpm-build |
6f7582 |
public:
|
|
rpm-build |
6f7582 |
//! the constructor
|
|
rpm-build |
6f7582 |
MWAWFontSJISConverter();
|
|
rpm-build |
6f7582 |
//! the destructor
|
|
rpm-build |
6f7582 |
~MWAWFontSJISConverter();
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
//! try to return a unicode for a shift jis character ( returns -1 if the character can not be converted )
|
|
rpm-build |
6f7582 |
int unicode(unsigned char c, MWAWInputStreamPtr &input);
|
|
rpm-build |
6f7582 |
//! try to return a unicode for a shift jis character ( returns -1 if the character can not be converted )
|
|
rpm-build |
6f7582 |
int unicode(unsigned char c, unsigned char const *(&str), int len);
|
|
rpm-build |
6f7582 |
//!init the mapping
|
|
rpm-build |
6f7582 |
void initMap();
|
|
rpm-build |
6f7582 |
protected:
|
|
rpm-build |
6f7582 |
//! a map sjis->unicode
|
|
rpm-build |
6f7582 |
std::map<int,int> m_sjisUnicodeMap;
|
|
rpm-build |
6f7582 |
};
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
#endif
|
|
rpm-build |
6f7582 |
|
|
rpm-build |
6f7582 |
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
|