Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix issue with sed command when running on Mac #4
Some quick search for the phrase
There is one simple solution offered in reference 3 above (source):
However I don't think we necessarily need the final conversion back to latin1 from utf-8.
I'm going to give this a shot and see how it goes.
referenced this issue
Sep 23, 2013
Test of using the
Test and output:
Can I get the output of 'env' on your machine? Specifically the LANG and LC_* variables (and anything that looks related).
The purpose of "LANG=C" in the stripchars script is to fix this exact error ("illegal byte sequence"), but I bet you have different locale settings than I do, and maybe there are more locale-oriented variables that have to be set or unset for this to work. (I just copied the first thing I found for "illegal byte sequence", and that was enough to fix it on my mac.)
And sed stuff:
Huh, that's odd; you don't have any other locale-oriented environment vars aside from LANG, which I thought I already took care of.
What version of OS X are you on (just out of curiosity, not because it will tell me anything useful)?
I may take the advice of my friends; when I told them I was using sed to translate between character sets, they pointed out that python can almost surely do it in one line. I don't know enough python to know what that line is, but I can figure it out.