bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newline handling


From: Bruno Haible
Subject: Re: Newline handling
Date: Thu, 28 Mar 2024 04:45:25 +0100

Collin Funk wrote:
> I can go through all the open() and codec.open() calls and turn them
> into:
> 
>         with open(file_name, 'r', encoding='utf-8', newline='\n') as file:
>              # do something
> 
> and
> 
>         with open(file_name, 'w', encoding='utf-8', newline='\n') as file:
>              # do something
> 
> in that case. I think that should make everything work correctly.
> Would that be good?

This would be reasonable (*), but is low priority (because the average
gnulib-tool user will not see any effect from this). I've added it
to the gnulib-tool.py.TODO file.

(*) Although I'm not sure encoding='utf-8' is the right thing in all
circumstances...

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]