Skip to content

Text encoding/decoding library written in pure elixir

Notifications You must be signed in to change notification settings

nikneroz/exconv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exconv

Hex pm License Downloads

A small Elixir library for converting text between the unicode and different character sets inspired by erlyconv.

Test code

test_str = <<224, 236, 225, 243, 235, 224, 242, 238, 240, 237, 238, 45, 239, 238, 235, 232,
  234, 235, 232, 237, 232, 247, 229, 241, 234, 238, 229, 32, 32, 32, 32, 32, 32,
  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  32, 32, 32, 32, 32, 32, 32, 32, 32, 32>>

Exconv.to_unicode!(test_str, :cp1251)

Exconv.Mapper.list_of_encodings
[:gsm0338, :iso8859_4, :iso8859_5, :iso8859_7, :iso8859_6, :iso8859_2, :iso8859_3, :iso8859_1, :iso8859_14, :iso8859_15, :iso8859_16, :iso8859_13, :iso8859_11, :iso8859_8, :iso8859_9, :iso8859_10, :jis0201, :jis0212, :shiftjis, :jis0208, :cns11643, :big5, :ksx1001, :ksc5601, :johab, :old5601, :cp1258, :cp950, :cp936, :cp932, :cp874, :cp1256, :cp1257, :cp949, :cp1255, :cp1254, :cp1250, :cp1251, :cp1253, :cp1252, :latin2, :cp500, :cp875, :cp1026, :cp037, :cp775, :cp869, :cp855, :cp857, :cp852, :cp850, :cp861, :cp860, :cp862, :cp863, :cp866, :cp737, :cp864, :cp865, :cp437, :nextstep, :us_ascii_quotes, :cp856, :cp1006, :koi8_u, :apl_iso_ir_68, :koi8_r, :kps9566, :ibmgraph, :cp424, :kz1048, :croatian, :celtic, :greek, :thai, :dingbats, :romanian, :centeuro, :chinsimp, :symbol, :roman, :keyboard, :gurmukhi, :cyrillic, :chintrad, :ukraine, :gujarati, :inuit, :gaelic, :iceland, :turkish, :devanaga, :japanese]

Resources

Installation

If available in Hex, the package can be installed by adding exconv to your list of dependencies in mix.exs:

def deps do
  [
    {:exconv, "~> 0.1.3"}
  ]
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/exconv.

About

Text encoding/decoding library written in pure elixir

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published