bug-texinfo
[Top][All Lists]
Advanced

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

Re: Variant wcwidth results on Solaris


From: Gavin Smith
Subject: Re: Variant wcwidth results on Solaris
Date: Sat, 30 Mar 2019 17:33:23 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

On Sat, Mar 30, 2019 at 12:33:32PM +0100, Bruno Haible wrote:
> > It appears that lib/wcwidth.c does actually use uc_width.  So the best 
> > solution might be to carry on using the wcwidth function in the source 
> > code for texi2any (instead of changing this to uc_width), and change the 
> > configure-time checks to make sure that the replacement function is used 
> > when the values from the system wcwidth are unusual.
> 
> This is one way to solve your immediate problem, yes.
> 
> > Should a note be added to 
> > doc/posix-functions/wcwidth.texi saying that libunistring should be used 
> > if you want to get consistent results across systems?
> 
> wcwidth is a POSIX function. The idea of wanting to get the same result
> across platforms, for a POSIX function, is a too strong wish. POSIX allows
> different implementations. Gnulib does overrides only when
>   - the platform's implementation is clearly buggy, or
>   - the glibc implementation is vastly superior in all aspects, or
>   - the differences between platforms are unacceptable.
> 

What I've done is change the test case to avoid the line breaking issue.  
This avoids the need for any special check for this issue, while keeping 
the test suite useful on Solaris.  The system wcwidth will still be used 
on Solaris, so differing results are still possible, just no cases that 
lead to this are present in the test suite.



reply via email to

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