Skip to content

Encoding problem with string format #1511

@retoo

Description

@retoo

String#% (string formatting) converts to wrong encoding when a %s is supplied with an integer.

x = "%s ä"
puts x.encoding
puts (x % 2).encoding

prints

UTF-8
US-ASCII

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions