Skip to content

Don't change default encoding globals #23

Description

@jrochkind

Hi, I'm looking into existing ruby code for dealing with webvtt, thanks for making this available!

Loading this gem causes the global default encodings for ruby to be changed:

if defined?(Encoding)
Encoding.default_internal = Encoding.default_external = "UTF-8"
end

An app may have it's own reasons for choosing different default encodings. It's not polite to silently change them after loading a gem.

Is it possible to make the webvtt-ruby code use explicit encodings in it's calls where it wants them, instead of changing the global defaults?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions