I'm working with 10+ years old machines which use ISO 8859-7 to represent Greek characters using a single byte each. I need to catch those characters and convert them to UTF-8 in order to inject them in a JSON to be sent via HTTPS. Also, I'm using GCC v4.4.7 and I don't feel like upgrading so I can't use codeconv or such.
Example: "OΛΑ":
I get char values [ 0xcf, 0xcb, 0xc1, ], I need to write this string "\u039F\u039B\u0391".
PS: I'm not a charset expert so please avoid philosophical answers like "ISO 8859 is a subset of Unicode so you just need to implement the algorithm".