Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.2, 6.4.3
-
-
35c96115c (dev), 0175fcf36 (6.5), cc37ef66f (tqtc/lts-6.2)
Description
A minimal reprodcer:
# This Python file uses the following encoding: utf-8 import sys from PySide6.QtWidgets import QApplication from PySide6.QtCore import QLocale if __name__ == "__main__": app = QApplication(sys.argv) locale = QLocale.system() print(locale.bcp47Name()) print(locale.name()) sys.exit(app.exec())
On, for example, Japanese system, the outputs are still en-JP and en_JP. The C++ APIs output ja and ja_JP, which is correct. Also, PySide6 on Windows outputs the correct names, i.e. ja and ja_JP. So in short, PySide6 on macOS does not handle locales correctly.
BTW, a more straightforward test:
locale.language()
returns Language.English for Japanese macOS.
Attachments
Issue Links
- relates to
-
QTBUG-63324 iOS/macOS: system localization always returns english language
- Closed
-
PYSIDE-2485 Calling QLocale::bcp47Name crashes on macOS
- Closed