Skip to content

Locale VM plugin always returns the default English on Mac Os #715

@stormwatch

Description

@stormwatch

Dear maintainers:

It looks like the locale reported by the VM is not working as it should. No matter what I try, I always get the default: English. This was originally reported in the Cuis mailing list.

How to Reproduce

Change your OS locale to a language other than English.

I tried with Portuguese and Italian; currently I'm on Italian. The output of /usr/bin/locale is:

LANG="it_IT.UTF-8"
LC_COLLATE="it_IT.UTF-8"
LC_CTYPE="it_IT.UTF-8"
LC_MESSAGES="it_IT.UTF-8"
LC_MONETARY="it_IT.UTF-8"
LC_NUMERIC="it_IT.UTF-8"
LC_TIME="it_IT.UTF-8"
LC_ALL=

And here is the configuration as reported by the UI:
Image

In Squeak or Pharo (actually Glamorous Toolkit)

Evaluate

Locale current

In GT it prints as:

a Locale(en-PT)

Portugal is correctly reported, as the current configured country in the OS.

In Squeak it prints as:

a Locale(en-US <English (UNITED STATES)>)

In Cuis

Evaluate

Feature require: 'Locales'.
Locale current

It prints as:

a Locale(en-PT)

Speculation

It seems like it all boils down to Locale >> primLanguage. It always returns the null-terminated 'en�'.

Computer

MacBook Air, Intel, 2017
Mac OS Monterey 12.7.6 (21H1320)

Please let me know if you need me to try more things.

Thank you!

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