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

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

    <bug>
          <bug_id>30083</bug_id>
          
          <creation_ts>2014-05-19 01:47:46 +0400</creation_ts>
          <short_desc>Cyrillic letters not printed in the output of some cmds</short_desc>
          <delta_ts>2014-05-25 15:15:40 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>ghc7.6.1-darcs</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ivan Zakharyaschev">imz</reporter>
          <assigned_to name="Denis Smirnov">mithraen</assigned_to>
          
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>146611</commentid>
    <comment_count>0</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2014-05-19 01:47:46 +0400</bug_when>
    <thetext>ghc7.6.1-darcs-2.8.4-alt2

In the output of some commands Cyrillic letters are not printed as is, but rather as codes, so they are not readable. (Although the locale is Cyrillic.)

$ darcs init
$ echo Здравствуйте &gt; hello.txt
$ darcs add -r .
$ darcs wh 
addfile ./hello.txt
hunk ./hello.txt 1
+&lt;U+00D0&gt;&lt;U+0097&gt;&lt;U+00D0&gt;&lt;U+00B4&gt;&lt;U+00D1&gt;&lt;U+0080&gt;&lt;U+00D0&gt;&lt;U+00B0&gt;&lt;U+00D0&gt;&lt;U+00B2&gt;&lt;U+00D1&gt;&lt;U+0081&gt;&lt;U+00D1&gt;&lt;U+0082&gt;&lt;U+00D0&gt;&lt;U+00B2&gt;&lt;U+00D1&gt;&lt;U+0083&gt;&lt;U+00D0&gt;&lt;U+00B9&gt;&lt;U+00D1&gt;&lt;U+0082&gt;&lt;U+00D0&gt;&lt;U+00B5&gt;
$ locale
LANG=ru_RU.UTF-8
LC_CTYPE=&quot;ru_RU.UTF-8&quot;
LC_NUMERIC=&quot;ru_RU.UTF-8&quot;
LC_TIME=&quot;ru_RU.UTF-8&quot;
LC_COLLATE=&quot;ru_RU.UTF-8&quot;
LC_MONETARY=&quot;ru_RU.UTF-8&quot;
LC_MESSAGES=&quot;ru_RU.UTF-8&quot;
LC_PAPER=&quot;ru_RU.UTF-8&quot;
LC_NAME=&quot;ru_RU.UTF-8&quot;
LC_ADDRESS=&quot;ru_RU.UTF-8&quot;
LC_TELEPHONE=&quot;ru_RU.UTF-8&quot;
LC_MEASUREMENT=&quot;ru_RU.UTF-8&quot;
LC_IDENTIFICATION=&quot;ru_RU.UTF-8&quot;
LC_ALL=
$ 

As far as I remember, this wasn&apos;t like this in some previous version of darcs, probably 2.1.2-alt2 -- http://packages.altlinux.org/en/Platform5/srpms/darcs .

Perhaps, there are other commands where this happens, and I&apos;ll report them later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146612</commentid>
    <comment_count>1</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2014-05-19 04:15:16 +0400</bug_when>
    <thetext>Workaround: use &quot;darcs diff&quot;, which uses the external diff tool (and hence is slower):

$ darcs diff
diff -rN -u old-darcs-Cyr/hello.txt new-darcs-Cyr/hello.txt
--- old-darcs-Cyr/hello.txt	1970-01-01 03:00:00.000000000 +0300
+++ new-darcs-Cyr/hello.txt	2014-05-19 04:11:15.678289159 +0400
@@ -0,0 +1 @@
+Здравствуйте
$ 

From the manpage:

...

           By default, `darcs whatsnew&apos; uses Darcs&apos; internal format for changes.  To see some context (unchanged lines) around  each  change,
           use the --unified option.  To view changes in conventional `diff&apos; format, use the `darcs diff&apos; command; but note that `darcs what‐
           snew&apos; is faster.

...

       darcs diff [file|directory]...
           The  `darcs  diff&apos;  command  compares  two  versions of the working tree of the current repository.  Without options, the pristine
           (recorded) and unrecorded working trees are compared.  This is lower-level than the `darcs whatsnew&apos; command, since it  outputs  a
           line-by-line  diff,  and it is also slower.  As with `darcs whatsnew&apos;, if you specify files or directories, changes to other files
           are not listed.  The command always uses an external diff utility.

...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146613</commentid>
    <comment_count>2</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2014-05-19 04:21:30 +0400</bug_when>
    <thetext>Also the Cyrillic letters in the output of &quot;darcs whatsnew&quot; generate soem strange garbage around them on dumb terminals:

$ echo world &gt; world.txt
$ darcs add world.txt 
$ darcs wh | cat
addfile ./hello.txt
hunk ./hello.txt 1
+[_&lt;U+00D0&gt;_][_&lt;U+0097&gt;_][_&lt;U+00D0&gt;_][_&lt;U+00B4&gt;_][_&lt;U+00D1&gt;_][_&lt;U+0080&gt;_][_&lt;U+00D0&gt;_][_&lt;U+00B0&gt;_][_&lt;U+00D0&gt;_][_&lt;U+00B2&gt;_][_&lt;U+00D1&gt;_][_&lt;U+0081&gt;_][_&lt;U+00D1&gt;_][_&lt;U+0082&gt;_][_&lt;U+00D0&gt;_][_&lt;U+00B2&gt;_][_&lt;U+00D1&gt;_][_&lt;U+0083&gt;_][_&lt;U+00D0&gt;_][_&lt;U+00B9&gt;_][_&lt;U+00D1&gt;_][_&lt;U+0082&gt;_][_&lt;U+00D0&gt;_][_&lt;U+00B5&gt;_]
addfile ./world.txt
hunk ./world.txt 1
+world
$ 

Perhaps, this are the colored highlighting for these codes (they are printed red)... but this garbage doesn&apos;t appear around other highlighted text; for example, above the words &quot;addfile&quot;and&quot;hunk&quot;are printed in blue in a terminal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>146662</commentid>
    <comment_count>3</comment_count>
    <who name="Ivan Zakharyaschev">imz</who>
    <bug_when>2014-05-25 15:15:40 +0400</bug_when>
    <thetext>Reported upstream: 
* http://bugs.darcs.net/issue2389
* http://bugs.darcs.net/issue2391</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>