Re: [dev] sed breaks utf8 in [ ]

From: Markus Wichmann <nullplan_AT_gmx.net>
Date: Mon, 30 Mar 2015 19:05:19 +0200

On Mon, Mar 30, 2015 at 08:50:11AM -0700, Evan Gates wrote:
> The problem is using glibc's regex engine without first calling
> setlocale to ensure a UTF-8 locale. This causes it to remain in the
> C/POSIX locale. This will effect the same problem in all tools that
> use the libc's regex engine (expr, grep, nl, sed). No good clean
> solution comes to mind yet, I'll keep thinking about it. Any ideas?
>

How about simply calling setlocale()? Or was that too simple? If the
user has set a non-UTF-8 locale and then uses UTF-8, that's on them!

> -emg
>
Received on Mon Mar 30 2015 - 19:05:19 CEST

This archive was generated by hypermail 2.3.0 : Mon Mar 30 2015 - 19:12:08 CEST