<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I'm working on bug 11789: <a href="http://llvm.org/bugs/show_bug.cgi?id=11789">http://llvm.org/bugs/show_bug.cgi?id=11789</a><div><br></div><div>As part of it, I need to take a C string for a PredefinedExpr, and emit the equivalent wchar_t string literal. Right now my code just casts chars to wchar_t, but I realize this isn't right, since it will break whenever clang is targeting a platform other than that which it was compiled on. My question is, is there an example of existing code for taking a string, encoded as char, and turning it into an array of bytes appropriately encoded as wchar_t for the target platform? If not, could anybody point me to a safe way to do this? Thanks!</div><div><br></div><div>Best regards,</div><div>Aaron</div></body></html>