Coder Social home page Coder Social logo

encoding's Introduction

各種文字コードをUnicodeコードポイント(UTF-32)へ変換するためのライブラリです.

----------------------------------------
Encoding::getEncoding(src, src_size)
	文字コードを判定します.判定できるコードは以下の通り.
		UTF-16LE/BE (with/without BOM)
		UTF-8 (with/without BOM)
		Shift_JIS/CP932 (JIS X 2013:2004)
		EUC-JP (JIS X 2013:2004)

Encoding::decode(dest, dest_size, src, src_size, encoding)
	指定した文字コードのテキストをUnicodeコードポイント配列に変換し,
	実際に格納されたコードポイント数を返します.
	destがnullptrだった場合はdestに必要なサイズのみ計算して返します.

Encoding::encode(dest, dest_size, src, src_size, encoding)
	Unicodeコードポイント配列を指定した文字コードのテキストに変換し,
	実際に格納されたバイト数を返します.
	destがnullptrだった場合はdestに必要なサイズのみ計算して返します.
	(まだ実装してないです...)

----------------------------------------
JIS X 0213 to Unicode変換テーブル
	x0213.orgの「JIS X 0213:2004 漢字8ビット符号とUnicodeの対応表」を元に
	機械変換を行って作成しています.
	http://x0213.org/codetable/jisx0213-2004-8bit-std.txt
	元のテーブルでUnicode側が2文字シーケンス(「か゜」など)になっているものは
	U+FFFD(判定不能文字)へ割り当てています.

----------------------------------------
文字コード判定
	Jcode.pmの方法を参考にしています.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.