I’m trying fetch some content from local web site which might not use UTF-8, after Google a lot, I still couldn’t find a way in OCaml to decode the GBK string.
Meanwhile, it’s easy in Python with web_source.content.decode('gbk') , and in Golang version:
Of course in your case you want to go in the opposite direction, so switch the ‘in’ and ‘out’ encodings. Check your installed packages, you may already have Camomile as a transitive dep.