Am 31.05.2012 um 21:14 schrieb Lanny Ripple:

> System sed (expected):
> 
>  lanny;~> echo "Rémi Leblond" | LANG=C LC_ALL=C /usr/bin/sed -ne 
> 's/.*/GIT_AUTHOR_NAME='\''&'\''/p'
>  GIT_AUTHOR_NAME='Rémi Leblond'
> 
> fink sed (unexpected.  .* breaks at é):
> 
>  lanny;~> echo "Rémi Leblond" | LANG=C LC_ALL=C /sw/bin/sed -ne 
> 's/.*/GIT_AUTHOR_NAME='\''&'\''/p'
>  GIT_AUTHOR_NAME='R'émi Leblond
> 
> This causes git rebase to fail.


This seems to be twice incorrect behaviour IMO. The character "é" is illegal in 
a C (or POSIX) language environment which only allows 7-bit or US-ASCII 
characters. Fink's (g)sed makes in your example at least a try to fix the 
irregular situation, doing é -> e' substitution, and seems to actually fail. In 
my case, Mac OS X 10.6.8, Snow Leopard, GNU sed-Version 4.2.1 correctly outputs

        GIT_AUTHOR_NAME='Re'́mi Leblond

Which also shows that you or GIT have to adjust the substitute expression for 
sed, taking into account the presence of ' in names. (But actually the test is 
wrong, since it uses an illegal entity, the "é".)


This happens in one GNU Emacs shell with font A. When I use font B I can 
clearly see that a COMBINING ACUTE ACCENT, U+0301, is following the "'", 
APOSTROPHE at U+0027, which can indicate that GNU sed is not aware of the fact 
that Mac OS X does not use the pre-composed characters. This is different from 
Ubuntu.

This happens with Fink's gsed 4.2.1 and MacPorts' gsed 4.2.1.

Apple's sed seems to be clever enough to use for reading and writing an 
encoding suiting the characters in the input stream.


My final statement: no sed implementation is faulty and needs an update (or 
patch), it's as so often the test case which is incorrect, so say the least.

--
Greetings

  Pete

There's no place like 127.0.0.1
                        – origin unknown


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Fink-users mailing list
[email protected]
List archive:
http://news.gmane.org/gmane.os.macosx.fink.user
Subscription management:
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to