Code Monkey home page Code Monkey logo

charcode-lua's Introduction

filter string by charsets with pure lua, with converter-charsets tables, add one GB2312 table

license with GPL v2

3 functions return

--[[
--  README
--  conv_from_utf is for making native string from utf-8, with charset defined
--  conv_to_utf   is for making utf8 string from native string, with charset defined
--  FilterText    is for checking if text all in charsets defined, '+' to make more than one charset
--  charsets supported list in normalize_charset_name function, charset_names, case insensitive
--  GBK alias to CP936, BIG5 alias to CP950, UTF8 alias to UTF_8
--]]

return {
  FilterText = FilterText,
  conv_to_utf = native_string_to_utf8,
  conv_from_utf = native_string_from_utf8
}

to use it, you need to add the script_path to package.path, like it in test.lua

package.path = package.path .. ';script_path/?.lua'
local charcode = require('charcode')
local FilterText = charcode.FilterText
local conv_to_utf = charcode.conv_to_utf
local conv_from_utf = charcode.conv_from_utf

to make dist, just run in linux make clean && make && make test to use with rime,

  • run make clean && make && make && test
  • copy dist\charcode-lua to path_to_rime_user_dir
  • patch lines in charcode_lua_schema_patch.txt to your schema custom file
  • deploy your schema, and have fun

charcode-lua's People

Contributors

fxliang avatar

Watchers

 avatar

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.