git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Encoding problem on OSX?

From
İDİsmail Dönmez <ismail@namtrac.org>
Date
Aug 11, 2010, 08:20 UTC
Message-ID
<AANLkTin1bspb+bzt6P1Fz7Q11=F2ZBftC19XQuQqHL+B@mail.gmail.com>
In-Reply-To
<20100811075503.GD5450@burratino>
Hi;
On Wed, Aug 11, 2010 at 10:55 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 13 quoted lines
> İsmail Dönmez wrote:
>
>> [~]> printf 'Th\360\235\204\236s\n' | sed 's/.*//g'
>>
>> [ismail@havana][08:51:06]
>> [~]>
>
> Thanks for checking.  So sed is not completely broken.  Could you try
>
>  sh t4201-shortlog.sh
>  cd "trash directory.t4201-shortlog"
>  git log
>  cat "trash directory.t4201-shortlog/log"
First of all note that this is not Mac's default sed but instead GNU sed:

GNU sed version 4.2.1 Copyright (C) 2009 Free Software Foundation, Inc.

Now the output of what you requested;
[~/Sources/git/t]>  sh t4201-shortlog.sh
ok 1 - setup
not ok - 2 default output format
#	
#		git shortlog HEAD >log &&
#		fuzz log >log.predictable &&
#		test_cmp expect.template log.predictable
#	
ok 3 - pretty format
ok 4 - --abbrev
ok 5 - output from user-defined format is re-wrapped
ok 6 - shortlog wrapping
ok 7 - shortlog from non-git directory
ok 8 - shortlog encoding
# failed 1 among 8 test(s)
1..8
[ismail@havana][11:18:24]
[~/Sources/git/t]>  cd "trash directory.t4201-shortlog"
[ismail@havana][11:18:33]
[~/Sources/git/t/trash directory.t4201-shortlog]> git log
commit ef6c19b4846d6a3e41f9a3ce746a3bffae653c17
Author: Jöhännës "Dschö" Schindëlin <Johannes.Schindelin@gmx.de>
Date:   Wed Aug 11 08:18:24 2010 +0000
    set a1 to 3 and some non-ASCII chars: áæï
commit d7c0787d081716755e2863f612d171846f503d4f
Author: Jöhännës "Dschö" Schindëlin <Johannes.Schindelin@gmx.de>
Date:   Wed Aug 11 08:18:24 2010 +0000
    set a1 to 2 and some non-ASCII chars: Äßø
commit 7e9687adfe33f5d2050f0fc4ab5004f324d3559f
Author: A U Thor <author@example.com>
Date:   Wed Aug 11 08:18:24 2010 +0000
    Test
[~/Sources/git/t/trash directory.t4201-shortlog]> cat log
commit 5fc75f5794d1cd8575fc3e2e86f9c0e1aa31723e
Author: Someone else <not!me>
Date:   Wed Aug 11 08:18:24 2010 +0000
    Commit by someone else
commit 0f5955f471a9d882b0e869752614b5123af19da3
Author: A U Thor <author@example.com>
Date:   Wed Aug 11 08:18:24 2010 +0000
    a								12	34	56	78
commit 0bb7d083233c266d9051b283913bd83000c9001f
Author: A U Thor <author@example.com>
Date:   Wed Aug 11 08:18:24 2010 +0000
    Th????s ????s a very, very long f????rst l????ne for the comm????t
message to see ????f ????t ????s wrapped correctly
commit 03a5a848c658751c51925127820491bf2a94a752
Author: A U Thor <author@example.com>
Date:   Wed Aug 11 08:18:24 2010 +0000
    Th𝄞s 𝄞s a very, very long f𝄞rst l𝄞ne for the comm𝄞t message
to see 𝄞f 𝄞t 𝄞s wrapped correctly
commit fdfc106190118f705dee70b56930764007353922
Author: A U Thor <author@example.com>
Date:   Wed Aug 11 08:18:24 2010 +0000
    This is a very, very long first line for the commit message to see
if it is wrapped correctly
commit 7e9687adfe33f5d2050f0fc4ab5004f324d3559f
Author: A U Thor <author@example.com>
Date:   Wed Aug 11 08:18:24 2010 +0000
    Test
Previous: Jonathan NiederNext: Jonathan Nieder
Message 5 of 14 in “Encoding problem on OSX?”
  1. İsmail DönmezAug 9, 2010
  2. Jonathan NiederAug 9, 2010
  3. İsmail DönmezAug 10, 2010
  4. Jonathan NiederAug 11, 2010
  5. İsmail DönmezAug 11, 2010
  6. Jonathan NiederAug 11, 2010
  7. İsmail DönmezAug 11, 2010
  8. Jonathan NiederAug 11, 2010
  9. İsmail DönmezAug 11, 2010
  10. İsmail DönmezAug 11, 2010
  11. Jonathan NiederAug 11, 2010
  12. Jonathan NiederSep 27, 2010
  13. Kevin BallardSep 27, 2010
  14. İsmail DönmezSep 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.