https://bugs.kde.org/show_bug.cgi?id=519534

--- Comment #2 from Walter Clements <[email protected]> ---
I investigated the possible root cause further and found a potentially relevant
code path in Falkon's language handling.

In `src/lib/preferences/acceptlanguage.cpp`,
`AcceptLanguage::defaultLanguage()` uses:

```cpp
QString longCode = QLocale::system().name()
    .replace(QLatin1Char('_'), QLatin1Char('-'));
```

On systems using `C.UTF-8`, Qt may return `C`, which is not a valid BCP 47
language tag for JavaScript's `Intl.Locale`.

In `src/lib/network/networkmanager.cpp`, Falkon passes the configured language
list to `QWebEngineProfile::setHttpAcceptLanguage()` without apparent
validation.

This may explain why both fail with:

`RangeError: Incorrect locale information provided`

A possible fix would be to handle the `C`/`POSIX` locale specially and validate
language preferences before passing them to Qt WebEngine.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to