Re: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-26 Thread Corinna Vinschen
On Jun 25 18:09, Corinna Vinschen wrote: On Jun 25 18:03, Corinna Vinschen wrote: On Jun 25 15:38, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote: Your locale is zh_CN.UTF-8. What you're expecting is only guaranteed in the C locale: [...] Which also means, AFAICS, Cygwin's sed is doing

[BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Atry
yangbo@YANGBOI5 ~ $ cygcheck -s -v -r Cygwin Configuration Diagnostics Current System Time: Tue Jun 25 15:27:31 2013 Windows 7 Ultimate Ver 6.1 Build 7601 Service Pack 1 Running under WOW64 on AMD64 Path: C:\cygwin\home\yangbo\bin C:\cygwin\usr\local\bin C:\cygwin\bin

Re: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Corinna Vinschen
On Jun 25 22:37, Atry wrote: [...] $ echo abcdeABCDE | sed -e 's/[B-D]/_/g' ab__eA___E Your locale is zh_CN.UTF-8. What you're expecting is only guaranteed in the C locale: $ LANG=C echo abcdeABCDE | sed -e 's/[B-D]/_/g' The character ordering is based on the default Windows ordering for

RE: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
Your locale is zh_CN.UTF-8. What you're expecting is only guaranteed in the C locale: I'm not quite sure it applies here. I'm using US English Windows 7. LANG = 'en_US.UTF-8' I get the same result: $ echo abcdeABCDE | sed -e 's/[B-D]/_/g' ab__eA___E BUT: $ echo abcdeABCDE | LANG=C sed

RE: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C]
The character ordering is based on the default Windows ordering for the locale, and that's dictionary ordering, apparently. Ah, I see what you meant here. There's an elaborated explanation: http://www.gnu.org/software/gawk/manual/html_node/Ranges-and-Locales.html Anton Lavrentiev Contractor

Re: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Corinna Vinschen
On Jun 25 15:38, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote: Your locale is zh_CN.UTF-8. What you're expecting is only guaranteed in the C locale: I'm not quite sure it applies here. I'm using US English Windows 7. LANG = 'en_US.UTF-8' I get the same result: $ echo abcdeABCDE |

RE: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Buchbinder, Barry (NIH/NIAID) [E]
Lavrentiev, Anton sent the following at Tuesday, June 25, 2013 11:44 AM The character ordering is based on the default Windows ordering for the locale, and that's dictionary ordering, apparently. Ah, I see what you meant here. There's an elaborated explanation:

Re: [BUG REPORT]sed -e 's/[B-D]/_/g' replaces unexpected characters

2013-06-25 Thread Corinna Vinschen
On Jun 25 18:03, Corinna Vinschen wrote: On Jun 25 15:38, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote: Your locale is zh_CN.UTF-8. What you're expecting is only guaranteed in the C locale: I'm not quite sure it applies here. I'm using US English Windows 7. LANG = 'en_US.UTF-8'