Skip to content

Add user callback for handling invalid characters. #53

@ashtuchkin

Description

@ashtuchkin

Inspired by ICU, something like:

  buf = iconv.encode(str, 'win1251', { invalidCharHandler: function(char) {
    // Here you can either throw exception which will be propagated outside,
    // or return a replacement char.
  });

Probably, some default handlers would also be nice (always throwing, always returning '?', trying to transliterate).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions