Skip to content

Dutch ‘IJ’ capitalisation. #11

@TriangulumDesire

Description

@TriangulumDesire

Firstly, let me thank you for all of the work you have put into this library. It is exactly what I was looking for.

In Dutch, there exists a digraph ‘IJ’. In many circumstances, it is treated as if it were a single letter. If a word begins with IJ, then both letters will be capitalised if the first letter needs to be capitalised. (More information here.) For example, the name of the IJssel river has both a capital I and J.

With this in mind, the to_titlecase function should act as follows:

const auto decodedString = unicode::utf8::decode("ik hou van ijsje");

// Call to_titlecase with Dutch language code.
const auto titleCaseCodepoints = unicode::to_titlecase(decodedString , "nl");

// encodedString should be "Ik Hou Van IJsje" instead of "Ik Hou Van Ijsje".
const auto encodedString = unicode::utf8::encode(titleCaseCodepoints);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions