Skip to content

invalid unicode sequence: \u{201 #8219

@mokagio

Description

@mokagio

Logging this issue for discoverability and future reference as there's currently no fix for it.

While testing #8214, I noticed the following output from genstrings:

invalid unicode sequence: \u{201
invalid unicode sequence: \u{201
invalid unicode sequence: \u{201

The string that generates those errors is:

static let learnMoreText = NSLocalizedString(
"%1$@ about In\u{2011}Person Payments",
comment: """
A label prompting users to learn more about In-Person Payments.
\u{2011} is a special character that acts as nonbreaking hyphen for "-" in the "In-Person" string.
%1$@ is a placeholder that always replaced with \"Learn more\" string,
which should be translated separately and considered part of this sentence.
"""
)

Where the value generates two of those messages –one for the computed key and one for the value– and the comment the remaining one.

Unfortunately, this is a known bug in the toolchain.

The workaround endorsed by an Apple Developer Tools Engineer is to use the actual character in the string. In this case, though, that's not an option because we want to maintain the non-breaking behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: i18nRelated to localization/internationalization.category: toolingAnything that involves building & maintaining the project, including scripts, `Fastfile`, etc.category: won’t fixConsidered and it was determined we do not plan to work on it at this time.type: bugA confirmed bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions