Skip to content

Missing titlecase and/or uppercase mappings? #257

@djudd

Description

@djudd

Describe the bug
I'm not really sure what's going on here, if this is expected for a reason I don't understand or possibly indicative of a larger problem, but:

ß doesn't appear to have titlecase or uppercase mappings, although it should (IIUC) map to Ss and SS respectively. It does casefold to ss as expected.

To Reproduce
Steps to reproduce the behavior:

pry(main)> "ß".upcase
=> "SS"
pry(main)> "ß".localize.upcase.to_s
=> "ß"
pry(main)> "ß".localize.titlecase.to_s
=> "ß"
pry(main)> "ß".localize.casefold.to_s
=> "ss"

(NB: It doesn't appear to matter what locale I provide; I tried localize(:de) and localize(:zh) with identical results. And similar mappings aren't always missing, e.g. "dž" is handled fine.)

Expected behavior
I expected "ß".localize.upcase.to_s to produce SS (as Ruby's built-in upcase method does) and "ß".localize.titlecase.to_s to produce Ss.

Screenshots
n/a

Environment

pry(main)> TwitterCldr::VERSION
=> "6.11.3"
pry(main)> TwitterCldr.locale
=> :en
pry(main)> RUBY_VERSION
=> "2.7.4"

Additional context
none

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