Parse non-ascii string from argv in 'main' function C++

130 Views Asked by At

I am writing a console program that processes files passed by the user as launch arguments (reads, processes in a certain way, writes to other files). The problem is that file paths can contain chinese, german, ukrainian and other non-standard letters, which are incorrectly processed by the program (impossible to open files due to an incorrect path). I can use 'wmain' and 'wchar_t** argv' instead of 'main' and 'char** argv', but I haven't seen any library for argument parsing that supports wchar_t argv, and I, besides paths, have to parse many more parameters of different types.

Tell me, please:

  1. Is it possible to get by with exclusively ordinary char when processing paths containing non-ascii characters?
  2. Do you know any argument parsing libraries that support 'wmain'? (most popular, 'argparse', doesn`t support it.)
0

There are 0 best solutions below