Issue 63 in vim: sed: RE error: illegal byte sequence

540 views
Skip to first unread message

v...@googlecode.com

unread,
Apr 23, 2012, 6:33:25 AM4/23/12
to vim...@vim.org
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 63 by daddyez...@gmail.com: sed: RE error: illegal byte sequence
http://code.google.com/p/vim/issues/detail?id=63

What steps will reproduce the problem?
1. clone repo
2. ./configure
3. make

What version of the product are you using? On what operating system?

latest version 7.3.300+

Please provide any additional information below.

On osx I've some troubles compiling vim, this because this file:
runtime/tools/efm_perl.pl

em_perl.pl contains an UTF-8 char but the file isn't encoded correctly (?)

So I got:

perlpath=`./which.sh perl` && sed
-e "s+/usr/bin/perl+$perlpath+" ../runtime/tools/efm_perl.pl
>/usr/local/src/vim/HEAD/share/vim/vim73/tools/efm_perl.pl
sed: RE error: illegal byte sequence
make[1]: *** [installtools] Error 1

My locale is correctly UTF8

LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

My fix at the moment is:

iconv -c -t UTF-8 ./runtime/tools/efm_perl.pl > ./runtime/tools/efm_perl.pl

v...@googlecode.com

unread,
Apr 23, 2012, 7:47:50 AM4/23/12
to vim...@vim.org

Comment #1 on issue 63 by vega....@gmail.com: sed: RE error: illegal byte
sequence
http://code.google.com/p/vim/issues/detail?id=63

efm_perl.pl is encoded as latin1, not UTF-8.

John Little

unread,
Apr 23, 2012, 11:22:23 PM4/23/12
to vim...@googlegroups.com, vim...@vim.org, codesite...@google.com
There's a copyright notice:

# Copyright (©) 2001 by Jörg Ziefle <joerg....@gmx.obfuscated>

The © and the ö are encoded in ISO 8859-1, aka latin1

> sed: RE error: illegal byte sequence

This looks to me like weirdness in the OS X implementation of sed. Mine (GNU sed version 4.2.1) has no trouble, with my own locale or en_US.UTF-8.

Regards, John

Charles Campbell

unread,
Apr 24, 2012, 11:28:04 AM4/24/12
to vim...@googlegroups.com
John Little wrote:
> There's a copyright notice:
>
> # Copyright (�) 2001 by J�rg Ziefle<joerg....@gmx.obfuscated>
>
> The � and the � are encoded in ISO 8859-1, aka latin1

>
>
>> sed: RE error: illegal byte sequence
>>
> This looks to me like weirdness in the OS X implementation of sed. Mine (GNU sed version 4.2.1) has no trouble, with my own locale or en_US.UTF-8.
>
Do these replies to the bugtracker issues actually get back to the
originator?

Regards,
Chip Campbell

v...@googlecode.com

unread,
Jul 8, 2012, 7:27:22 AM7/8/12
to vim...@vim.org
Updates:
Status: WontFix

Comment #2 on issue 63 by lech.lor...@gmail.com: sed: RE error: illegal
byte sequence
http://code.google.com/p/vim/issues/detail?id=63

(No comment was entered for this change.)

v...@googlecode.com

unread,
Jul 19, 2012, 7:05:47 PM7/19/12
to vim...@vim.org

Comment #3 on issue 63 by knisliu...@gmail.com: sed: RE error: illegal byte
sequence
http://code.google.com/p/vim/issues/detail?id=63

I'm sorry mr. lech is this OSX users discrimination or what??

we also have utf8 locales, and because of your latin1 outdated crap I can't
use vim at my job.. BECAUSE I CAN'T COMPILE IT! and it's your problem
ignoring LC vars.. definitely not OS problem or package maintainer.

v...@googlecode.com

unread,
Jul 20, 2012, 4:07:39 AM7/20/12
to vim...@vim.org

Comment #4 on issue 63 by dominiqu...@gmail.com: sed: RE error: illegal
byte sequence
http://code.google.com/p/vim/issues/detail?id=63

Non ASCII characters are only used in a comment.

Replacing them with ASCII characters makes the file
runtime/tools/efm_perl.pl both a valid latin1 and valid utf8 file.
I think it's safer to fix it this way rather than encoding the file in utf8.

See attached patch.


Attachments:
fix-charenc-efm_perl.pl-7.3.608.patch 586 bytes

v...@googlecode.com

unread,
Jul 25, 2012, 10:51:58 AM7/25/12
to vim...@vim.org
Updates:
Status: Fixed

Comment #5 on issue 63 by brammool...@gmail.com: sed: RE error: illegal
byte sequence
http://code.google.com/p/vim/issues/detail?id=63
Reply all
Reply to author
Forward
0 new messages