Ugh. Why can't I convert UTF-8 strings to ISO-8859-5 strings in D?
Also, why does Merecat seem to mess up my output?
@storydragon my adhd made me scroll through the merecat source code, and it doesn't look like it touches encoding at all. Do you have any method of checking the raw bytes written? E.g. using hexdump on the file, if it's written to a file, or outputting / logging the string as a byte array (or similar?)
(Or am I going too far into the hardcore coding end here? I don't know your context)
@zatnosk I suspect maybe it was just me not telling properly to Something what the character encoding was...
I know that when the cgi-script prints the output, everything is still okay. But then on the browser side it was messed up.
Explicitly setting UTF-8 as character encoding in the Content-Type header seems to work, but I believe that that is still not the end of my problem, for I believe I will have to convert the UTF-8 string to ISO-8859-X...
Also, I did edit my Merecat source code to be able to do logging the way I wanted to do it and to change another bit of behaviour as well.
@storydragon if one was ambitious one might be able to add Latin/Cyrillic (ISO 8859-5) by editing Phobos/std/encoding.d and working from a duplicate of the code implementing Latin2 (ISO 5598-2). But it might be easier to handroll a function that converts Unicode to a 8859-5 encoded bytestring...
Sorry, my brain is going on tangents. I hope you find a solution to your problem.