Skip to content

Set charset name and preprocess strings (parse_transform for erlang)

Notifications You must be signed in to change notification settings

mad-cocktail/schnapps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Set charset name and preprocess strings

It is a tiny parse transform, that converts literal strings into something else.

License: MIT

Author: Uvarov Michael (freeakk@gmail.com)

Status: Experimental

Build Status
-compile({parse_transform, gin}).
-encoding({SourceEncoding, StringsEncoding, StringsType}).

where:

  • SourceEncoding is a term of the unicode:encoding() type. Valid values:
    • latin1;
    • utf8;
    • {utf16, big};
    • {utf16, little};
    • {utf32, big};
    • {utf32, little}.
  • StringsEncoding is a term of the unicode:encoding() type. Valid values:
    • latin1;
    • unicode;
    • utf8;
    • utf16;
    • {utf16, big};
    • {utf16, little};
    • utf32;
    • {utf32, big};
    • {utf32, little}.
  • StringsType. Valid values:
    • list;
    • binary.
Common combinations:
  • {latin1, latin1, list}. This encoding is used by Erlang by default.
  • {utf8, unicode, list}. A string is a list of codepoints.
  • {utf8, utf16, binary}. The module uses probably ICU for string processing.

About

Set charset name and preprocess strings (parse_transform for erlang)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages