***gour_ is now known as gour
***fibratio` is now known as fibration
<Labu>I'am looking for a function which allows to replace arbitrary substring by another <Labu>example: (string-replace "zzxxaaxx" "xx" "aa") -> "zzaaaaaa" <Labu>I have looked in the documentation and I found nothing which fit with my needs <Labu>but I don't be really satisfied <daviid>Labu: fwiw, I would use regexp-substitute/global (ice-9 regex) <daviid>(define (string-replace-all str search-for replace-by) <daviid> (regexp-substitute/global #f search-for str 'pre replace-by 'post)) <rain1>what if 'search-for' contains any characters that regex interprets <daviid>string-replace-all expects strings, not regexp, but you could write another procedure, picking another name, that would ... feel free <rain1>for example (string-replace-all "zz.*aa.*" ".**" "aa") should return "zzaaaaaa" but it returns "aa" <daviid>as i said, it hasn't been written to solve the above, it expects strings <daviid>ah, i wrote this 2 decades ago, patch welcome ... <daviid>probably guix has a good tested str replace [all] procedure <rain1>ah, i was checking srfi 13 and it doesn't seem to have it <daviid>guix has string-replace-substring <rain1>that seems like a good function to move into guile itself <daviid>I would call it string-replace-all though but ... <rain1>yeah I prefer the name string-replace-all <Labu>right now I fight against encoding problems <Labu>I don't know yet If it comes from curl with I test my API or the lib I am using to parse input <spk121>OK. Let's make the Guile 2.2.x work on MinGW. <Labu>I get strange behaviour I can't explain. I am usin a web-server in a program wich I launch with run-server. If I get (port-encoding (current-output-port)) before launch the server I have UTF-8 encoding but in a handler pass to this server I have ASCII. Have I miss something to specify in run-server to get the correct encoding for stdout ? <amz3>Labu: did you call (setlocale LC_ALL "") ? <Labu>(display (setlocale LC_ALL))(newline) <Labu>it's strange because my locale are UTF-8 on my terminal <amz3>i don't remember read the doc about setlocale <Labu>I have just reading the documentation about this <Labu>(setlocale LC_ALL "") initialize all categories based on standard environment