5,316 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
7
votes
1
answer
129
views
Why does PHP setlocale not seem to accept a BCP 47 script subtag?
If I run the following code on a Linux server
<?php
declare(strict_types=1);
error_reporting(-1);
ini_set('display_errors', '1');
var_dump(Locale::acceptFromHttp('zh_Hant_TW'));
echo "<br&...
-1
votes
0
answers
30
views
How to upgrade cluster from Postgres 17 Windows to Postgres 18 Debian [migrated]
Postgres 17 cluster is in Windows server in Estonian locale. Databases are defined like
CREATE DATABASE mydb
WITH
OWNER = mydb_owner
ENCODING = 'UTF8'
LC_COLLATE = 'et-EE'
LC_CTYPE ...
2
votes
1
answer
144
views
How do I select the right language for my C program's output?
I am writing a C application, to be distributed as a single static binary (so it doesn't have a chance to do anything like install message catalog files). It only needs to support a few natural ...
Advice
1
vote
7
replies
87
views
Why does PHP on Windows allow a non-existent locale to be set?
If I run var_dump(setlocale(LC_ALL, 'xyz.utf-8'));
on Windows I get string(9) "xyz.utf-8" despite the fact that 'xyz' is not advertised in ResourceBundle::getLocales('') and having ...
8
votes
2
answers
585
views
Why does the Java collator for the Hungarian locale mix E and É?
I want to order a huge list of countries, and I have noticed that, for example, E and É are treated as equals. But in the Hungarian grammar, E comes before É, so a rule should be added, 'E < É'.
...
0
votes
1
answer
76
views
Date & time not being shown in japanese
I am using IBM MQ on a Windows 11 machine that was originally installed with the Japanese language pack—in other words, unlike the typical en-US installation, mine came with Japanese as the default. ...
-1
votes
3
answers
106
views
SwiftUI TextField with number format ignores environment locale
I'm facing the issue that SwiftUI's TextField with a number format seems to ignore the locale set by the environment modifier.
struct MyView: View {
@State
var number: Decimal = 1.1
var ...
4
votes
1
answer
121
views
Are spelling variations of encoding identifiers for "setlocale" standardized or documented?
This question has to do with syntactic conventions for string encoding identifiers in locale names passed to setlocale in C, focusing on the particular example of UTF-8. My preliminary observation is ...
0
votes
0
answers
43
views
untranslated shift-jis string
In the DxWnd program I added support for Japanese locale by converting UTF8 strings to WIDE strings and using the WIDECHAR system API, for instance when creating a window with a localized title string....
25
votes
13
answers
3k
views
How can I parse a string to a float in C in a way that isn't affected by the current locale?
I'm writing a program where I need to parse some configuration files in addition to user input from a graphical user interface. In particular, I'm having issues with parsing strings taken from the ...
5
votes
1
answer
97
views
Can I set the locale from within a Haskell program, so I can print unicode characters appropriately?
I'm building and running a cabal project with following code on WSL:
module Main where
main :: IO ()
main = do
putStrLn "█"
█ is the unicode character 0x2588, 9608 in decimal.
When cabal ...
4
votes
1
answer
141
views
Purpose of "variant" in Java Locale
The Locale class in Java can accept 3 arguments: language, country and variant.
The first two are self-explanatory. However, I don't understand the purpose of the variant argument.
This is the ...
2
votes
1
answer
74
views
Equivalent of `supportedLocalesOf` for letter-case conversion (`toLocaleLowerCase`, `toLocaleUpperCase`)?
In JavaScript, you can introspect support for various internationalization functionality by use of static supportedLocalesOf methods of the various classes namespaced under Intl. For example:
Intl....
0
votes
0
answers
78
views
How does spring-boot 3.5.0 evaluate which java.time.format.ResolverStyle to be used depending on the local?
I have a Restcontroller with a parameter with a LocalDate like this:
@RequestParam @Schema(requiredMode = REQUIRED) @NonNull final LocalDate startDate
When calling the endpoint with a Swedish ...
0
votes
1
answer
72
views
How to use environment locale except for numbers?
I'd like to combine the environment locale (for toUpper and such) with the C locale (for number formatting) in C++, how would I do that? I've read https://en.cppreference.com/w/cpp/locale/locale/...