On Sun, 2014-08-03 at 00:31 -0700, Kevin Cernekee wrote: > > OK - since this is called from the main executable I can add it to the > OPENCONNECT_PRIVATE export list as-is, or rename it to > openconnect_open_utf8() first? > > I wasn't 100% sure it was needed because there were a couple of other > "raw" open() / fopen() calls in main.c. But it looks like all of the > command line arguments do get translated into UTF-8 strings. Hm, good point. Since this never goes into the library theoretically it doesn't actually need to be converted to UTF-8. The library could deal with it as it sees fit. However, the approach of just using the local charset and never converting isn't sufficient for Windows. You might have out-of-codepage characters which are mangled in the standard argv[] and you *only* get them from the GetCommandLineW() call... which is done in our convert_arg_to_utf8() function. So yes, I suppose exporting openconnect_open_utf8() and perhaps also openconnect_fopen_utf8() under OPENCONNECT_PRIVATE is probably the way to go. I was planning to take a look at what *else* might want to be exported, now that charset handling ended up throughout libopenconnect (it started *only* in main.c). Maybe that convert_str() function... Feel free to leave that to me though, if you prefer. -- dwmw2 -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 5745 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/openconnect-devel/attachments/20140803/c150337f/attachment-0001.bin>