15
5
I have a very large file that has zero-width spaces scattered throughout. It takes too long to open and edit using vi so I'd like to delete all instances of the character using sed. The problem is, I can't figure out how to match the character! I've tried using \u200B, \x{200b}. Any ideas?
I'm running CentOS 5 if that helps at all.
Does your copy of sed support the Unicode encoding that the file is encoded with? If not there is probably no good way to do it properly with sed, and you'd better use a python script or something like that... – JanC – 2010-11-04T21:38:37.617
@JanC - indeed, I've gone with Python. The file is encoded with utf8, seems standard enough that anything should be able to process it. I've added my python script below, in case its useful to anyone. – thetaiko – 2010-11-04T21:47:50.807