<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>15851</bug_id>
          
          <creation_ts>2008-05-30 18:47:52 +0400</creation_ts>
          <short_desc>Sed ranges are broken in non-C locales</short_desc>
          <delta_ts>2020-07-09 12:03:20 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>Distributions</classification>
          <product>ALT Linux Desktop</product>
          <component>bugs</component>
          <version>4.0.2</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Julia Jomantaite">juliette</reporter>
          <assigned_to name="Anton V. Boyarshinov">boyarsh</assigned_to>
          
          
          <qa_contact name="Andrey Cherepanov">cas</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71036</commentid>
    <comment_count>0</comment_count>
    <who name="Julia Jomantaite">juliette</who>
    <bug_when>2008-05-30 18:47:52 +0400</bug_when>
    <thetext>When i use sed ranges (like [a-z]) in locales other than &quot;C&quot; uppercase letters
are matched by lowercase ranges.
In &quot;C&quot; locale this problem doesn&apos;t appear.

In other linux distributions (tested on Debian, Gentoo, Fedora) lowercase ranges
match only lowercase letters as one would expect. It seems this is because they
configure sed with --without-included-regex, while Alt does not.

Other utilities (like grep and tr) are not affected by this problem.
Steps to Reproduce:
1.Make sure that locale is not &quot;C&quot; (for example &quot;ru_RU.UTF8&quot;)
2.echo abcdABCD | sed -e &quot;s/[a-c]/0/g&quot;
Actual Results:  
000d00CD

Expected Results:  
000dABCD</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71046</commentid>
    <comment_count>1</comment_count>
    <who name="Andrey Rahmatullin">wrar</who>
    <bug_when>2008-05-30 19:42:29 +0400</bug_when>
    <thetext>https://bugs.gentoo.org/show_bug.cgi?id=149526#c4

*** This bug has been marked as a duplicate of 13870 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71050</commentid>
    <comment_count>2</comment_count>
    <who name="Julia Jomantaite">juliette</who>
    <bug_when>2008-05-30 20:37:09 +0400</bug_when>
    <thetext>(In reply to comment #1)
&gt; https://bugs.gentoo.org/show_bug.cgi?id=149526#c4
&gt; 
This problem has been solved in Gentoo (key --without-included-regex is used now).

Anyway sorting order should be the same for all utilities.

The following results are from the same locale:

[altlinux@localhost ~]$ echo abcdABCD | sed -e &quot;s/[a-c]/0/g&quot;
000d00CD
[altlinux@localhost ~]$ echo abcdABCD | grep -o &quot;[a-c]&quot;
a
b
c
[altlinux@localhost ~]$ echo abcdABCD | tr &quot;[a-c]&quot; 0
000dABCD

It can be obtained in both ru_RU.UTF-8 and ru_RU.KOI8-r locales so it&apos;s not the
UTF8 issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71815</commentid>
    <comment_count>3</comment_count>
    <who name="Mikhail Gusarov">dottedmag</who>
    <bug_when>2008-06-13 13:00:03 +0400</bug_when>
    <thetext></thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>191104</commentid>
    <comment_count>4</comment_count>
    <who name="Andrey Cherepanov">cas</who>
    <bug_when>2020-07-09 12:03:20 +0300</bug_when>
    <thetext>Поддержка дистрибутива завершена. Используйте новые версии.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>