This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

sed doesn't like LANG= anymore


A very long sed script that's been working for ages (back from the 1.5
age) here has stopped working.

It turned out sed doesn't like some strings anymore when environment
variable LANG is empty. With LANG=ASCII, there are no problems.

The actual text in the SED command is shown below as spaces, but it's a
Swedish a with a small o on top of it, like this:

sed -e"s/@a/ a/g;"

where a is character 0xe5.

Running with LANG=ASCII works, with LANG empty I get 'unterminated `s'
command' from sed (which confused me for a while).

This used to work up until a month ago or so with 1.7.x.

Kind regards,
Jurriaan

$ cat handle_kyocera_rapport2.sh
#!/bin/sh
filename=$1
filenameout=$2
sed -e"s/@å/ å/g;" $filename > $filenameout
$ ls > test.org
$ echo $LANG
ASCII
$ ./handle_kyocera_rapport2.sh test.org test.1
$ export LANG=
sed: -e expression #1, char 10: unterminated `s' command
$ cat test.org
handle_kyocera_rapport.sh
handle_kyocera_rapport2.sh
test.1
test.org
$ od -x ./handle_kyocera_rapport2.sh
0000000 2123 622f 6e69 732f 0a68 6966 656c 616e
0000020 656d 243d 0a31 6966 656c 616e 656d 756f
0000040 3d74 3224 730a 6465 2d20 2265 2f73 e540
0000060 202f 2fe5 3b67 2022 6624 6c69 6e65 6d61
0000100 2065 203e 6624 6c69 6e65 6d61 6f65 7475
0000120 000a
0000121

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]