cotti

u/cotti







r/learnprogramming•

Hi there. I'm making some simple stuff to, for example, colorize an input, and maybe later make it ready for use in pipes in Linux. It already works for general ASCII input - both a C and a C++ version.

The problem is, I'm not a native English speaker, so characters with different punctuations are going to happen. And when I just print the argv without messing with it, it prints fine just as I wrote, but if I treat them as individual characters, an interrogation point appears instead.

Seemed like a locale stuff. I never dealt with this before, and tried setlocale(ALL,"") to enforce environment locale in the program, but it didn't work.

First I tried with pure C, with simple char[] meddlin

53



You've reached the end of this feed.