Skip to content

Commit

Permalink
✨ ibm_866_cyrillic encodng
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhD committed May 11, 2023
1 parent 17f1dcf commit 6ba5588
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/ztd/text/encoding.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
#include <ztd/text/euc_kr.hpp>
#include <ztd/text/ibm_424_hebrew_bulletin.hpp>
#include <ztd/text/ibm_856_hebrew.hpp>
#include <ztd/text/ibm_866_cyrillic.hpp>
#include <ztd/text/ibm_1006_urdu.hpp>
#include <ztd/text/kazakh_strk1048.hpp>
#include <ztd/text/koi8_u.hpp>
Expand Down
64 changes: 64 additions & 0 deletions include/ztd/text/ibm_866_cyrillic.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// =============================================================================
//
// ztd.text
// Copyright © 2022-2023 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC
// Contact: opensource@soasis.org
//
// Commercial License Usage
// Licensees holding valid commercial ztd.text licenses may use this file in
// accordance with the commercial license agreement provided with the
// Software or, alternatively, in accordance with the terms contained in
// a written agreement between you and Shepherd's Oasis, LLC.
// For licensing terms and conditions see your agreement. For
// further information contact opensource@soasis.org.
//
// Apache License Version 2 Usage
// Alternatively, this file may be used under the terms of Apache License
// Version 2.0 (the "License") for non-commercial use; you may not use this
// file except in compliance with the License. You may obtain a copy of the
// License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ============================================================================ //

#pragma once

#ifndef ZTD_TEXT_IBM_866_CYRILLIC_HPP
#define ZTD_TEXT_IBM_866_CYRILLIC_HPP

#include <ztd/text/version.hpp>

#include <ztd/text/unicode_code_point.hpp>
#include <ztd/text/impl/single_byte_lookup_encoding.hpp>

#include <ztd/encoding_tables/ibm_866_cyrillic.tables.hpp>

#include <ztd/prologue.hpp>

namespace ztd { namespace text {
ZTD_TEXT_INLINE_ABI_NAMESPACE_OPEN_I_

template <typename _CodeUnit = char, typename _CodePoint = unicode_code_point>
class basic_ibm_866_cyrillic
: public __txt_impl::__single_byte_lookup_encoding<basic_ibm_866_cyrillic<_CodeUnit, _CodePoint>,
&::ztd::et::ibm_866_cyrillic_index_to_code_point, &::ztd::et::ibm_866_cyrillic_code_point_to_index,
_CodeUnit, _CodePoint> { };

//////
/// @brief An instance of skip_handler_t for ease of use.
inline constexpr basic_ibm_866_cyrillic<char> ibm_866_cyrillic = {};

ZTD_TEXT_INLINE_ABI_NAMESPACE_CLOSE_I_
}} // namespace ztd::text


#include <ztd/epilogue.hpp>

#endif

0 comments on commit 6ba5588

Please sign in to comment.