1

I use expand to expand tabs to spaces. For utf8 files expand doesn't work correctly. E.g. in ć\ta tab is expanded to 6 spaces while in a\ta to 7 spaces.

How do I make it work for utf8 files?

1 Answer 1

1

You could use a short bit of Python3 code, and just pipe the text thrugh it:

#!/usr/bin/python3
import sys, os
for line in sys.stdin.readlines():
    sys.stdout.write(line.expandtabs())

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.