On Fri, 22 Sep 2023 08:48:45 +0200 ASSI wrote: > Takashi Yano via Cygwin writes: > > I wonder why the following code throws std::runtime_error > > even though the LC_ALL is set to valid locale other than "C". > > This does not occur only when LC_ALL is set to "C". > > This functionality is currently only supported for Glibc targets in > libstdc++. I seem to remember that I've looked into this some time ago, > but there didn't seem to be an easy way of enabling it for Cygwin at > that time. Thanks for the answer. It might not be an easy way, but I tried to enabling the locale feature for libstdc++. Please try: 1) Run cygport gcc prep 2) Remove libstdc++-v3/config/locale/generic 3) Copy libstdc++-v3/config/locale/gnu to libstdc++-v3/config/locale/generic 4) Apply patches attached to the working source directory. 5) Run cygport gcc compile I also tried to automate above steps in gcc.cygport. Further, I tested and confirmed that a few test cases works as expected. What do you think of this idea? -- Takashi Yano