clojure 2026-07-02

This surprised me today:

// JDK25:

user=> (format "%,.2f" 12345.0)
"12,345.00"

// JDK26:

user=> (format "%,.2f" 12345.0)
"12 345,00"
Turns out, format in JDK26 now uses my system locale (being en_UA) instead of some default/compat one. Sadly enough, you can't customize a locale in format, have to use String/format instead.

💥 6
👀 1

It looks like JDK 26 changed the formatting for en_UA Given localetest.clj:

(println "Java version" (System/getProperty "java.runtime.version") (System/getProperty "java.vendor"))
(println "format with en-ua" (String/format (java.util.Locale. "en" "UA") "%,.2f" (to-array [12345.0])))
From my shell:
$ sdk use java 25.0.3-tem
$ clojure -M localetest.clj
Java version 25.0.3+9-LTS Eclipse Adoptium
format with en-ua 12,345.00

$ sdk use java 26.0.1-tem
$ clojure -M localetest.clj
Java version 26.0.1+8 Eclipse Adoptium
format with en-ua 12 345,00

Alex Miller (Clojure team) 2026-07-02T15:42:15.759319Z

I think they got rid of compat as of Java 23

Like I've said, it still works the old way up until 25 (on my machine). Or do you mean something else?

Alex Miller (Clojure team) 2026-07-02T15:44:22.186559Z

that must be a different change then

It looks related indeed, maybe they extended the migration period or something.

yipee!!!! my talk was accepted at clojure conj. Clojure in Academia

👏 9
👏🏻 1
🎉 30

Congrats! Definitely interested in that!

👨🏻‍🎓 1

See you there (again)!

😃 1