babashka

m3tti 2026-02-15T20:30:14.851799Z

I'm currently trying to read a string as ISO-8859-15 but it doesn't work in babashka

(slurp "datafile" :encoding "ISO-8859-15")
....
Caused by: java.io.UnsupportedEncodingException: ISO-8859-15
....

✅ 1
borkdude 2026-02-16T10:58:35.351429Z

I'm adding support for this charset and will release tomorrow

m3tti 2026-02-16T10:58:54.553239Z

how did you do that ?

m3tti 2026-02-16T10:59:12.588149Z

and btw found out that that was half of the truth the file is actually cp437 😄 which is actually something from back in dos

borkdude 2026-02-16T11:00:03.229159Z

--add-all-charsets is an option GraalVM supports but this adds 5 mb. I found out a way, using Claude, to write a GraalVM Feature to selectively add charsets which adds virtually nothing. ok I'll add cp437 too. you don't need the other one?

m3tti 2026-02-16T11:00:56.167799Z

for now cp437 is more than enough and i'm really greatfull if thats added 😄

borkdude 2026-02-16T11:01:11.637159Z

I learned that UTF-8 is a superset of cp437 so reading it as UTF-8 should work?

m3tti 2026-02-16T11:01:27.836329Z

actually i never thought i'll have to deal with ascii or any other format again since utf8 is allready really old

borkdude 2026-02-16T11:01:38.449779Z

sorry that's wrong what I said

m3tti 2026-02-16T11:01:46.951109Z

strange for me it gives me strange characters

borkdude 2026-02-16T11:02:14.514619Z

yeah sorry I was wrong.

borkdude 2026-02-16T11:02:29.875609Z

so let me try cp437

m3tti 2026-02-16T11:02:47.854759Z

aren't we all wrong 😉 at some points in time

m3tti 2026-02-16T11:03:29.604489Z

the good old "i am the greatest -> damn i'm so stupid -> oh wow whats that did i do that -> i'm the greatest" loop 😄

borkdude 2026-02-16T11:06:09.046419Z

hehehe

borkdude 2026-02-16T11:06:55.115029Z

I thought: if we can find an already supported superset that's already included, then we're done. GraalVM native-image only includes 7 charsets by default: US-ASCII, ISO-8859-1, UTF-8, UTF-16, UTF-16BE, UTF-16LE, and the system default. All other charsets require explicit inclusion.

borkdude 2026-02-16T11:07:22.540699Z

but I'll add your old DOS one

m3tti 2026-02-16T11:07:34.528299Z

i feel bad 😞

borkdude 2026-02-16T11:07:37.458819Z

tomorrow's release had a retro feeling to it anyway with the TUI support

borkdude 2026-02-16T11:07:59.302059Z

no reason to feel bad. now I have a nice foundation to add other charsets too when people ask for it

❤️ 2
m3tti 2026-02-16T11:08:03.474529Z

maybe we can write stuff like those old ibm interfaces

m3tti 2026-02-16T11:14:09.883959Z

Oh i'm not the only one :D cool

borkdude 2026-02-16T11:17:49.327909Z

https://github.com/babashka/babashka/pull/1929

❤️ 1
borkdude 2026-02-16T11:30:39.018509Z

Merged. you should be able to test the new dev build in 10 minutes

m3tti 2026-02-16T11:31:01.586429Z

i'll do that for sure

m3tti 2026-02-16T17:30:57.069919Z

ok where is my build 😄 can't find it 😄

m3tti 2026-02-16T17:34:03.015829Z

bash <(curl )  --dev-build --dir .
there it is i guess

borkdude 2026-02-15T20:31:39.567929Z

file a github issue please

❤️ 1
borkdude 2026-02-15T20:31:48.092439Z

why do you need this encoding

m3tti 2026-02-15T20:32:13.179729Z

the file is ISO8859-15 and it is brought by an external system 😕

m3tti 2026-02-15T20:33:05.015739Z

German Bureaucracy

borkdude 2026-02-15T20:33:54.698729Z

we could probably add support for this using a GraalVM flag. If you can do this research, write a test, we could merge it

m3tti 2026-02-15T20:34:51.990169Z

i'll check what we need to do just found the issue right now 😄 so lets me check 😉 I'll be back 😎 (in an austrian accent)