jupyter-xeus / cpp-terminal

C++ library for writing multiplatform terminal applications
https://jupyter-xeus.github.io/cpp-terminal/
Other
490 stars 53 forks source link

Windows unicode #314

Closed flagarde closed 10 months ago

flagarde commented 10 months ago

Windows use UNICODE (wchar_t in utf16), this PR add a better narrow<->wide converter only for Windows as utf16 is useless on other OS. I added special WindowsError exception too to be able to get the string corresponding to GetLastError() (converted to utf8 of course). This will allow to have better exceptions on windows without too much trouble. I expect to have one for errno too

flagarde commented 10 months ago

The goal is to move other utf8 utf32 function in unicode. and suppress conversion. Need better exception handling and test before moving to unicode.*