Hi,

2016/8/18 Thu 5:36:51 UTC+9 Danek Duvall wrote:
> On Wed, Aug 17, 2016 at 09:52:12PM +0200, Bram Moolenaar wrote:
> 
> > Danek Duvall wrote:
> > 
> > > I'm seeing this.  It's on Solaris, but I'm not sure whether that matters,
> > > or if it does, what aspect does.
> > > 
> > >     From test_startup_utf8.vim:
> > >     Found errors in Test_read_fifo_utf8():
> > >     function RunTheTest[9]..Test_read_fifo_utf8 line 24: Expected ['テスト', 
> > > '€ÀÈÌÒÙ'] but got []
> > > 
> > > When I run the RunVim command standalone:
> > > 
> > >     ../vim -f -u NONE -U NONE --noplugin --not-a-term --cmd "so b" <(cat 
> > > Xtestin)
> > > 
> > > I do in fact get nothing in the buffer, and a warning in the status line
> > > 
> > >     "/dev/fd/12" [character special][converted][READ ERRORS] 0 lines, 0 
> > > characters
> > > 
> > > I get the same thing if I remove cp932 from fencs and add ascii, but 
> > > latin1
> > > gives me something, at least.  Aren't errors in conversion supposed to be
> > > ignored and move vim on to the next entry in fencs, or am I
> > > misunderstanding that whole thing?
> > 
> > It is supposed to work.  No idea why it fails in your situation.
> > Would require debugging (or adding some printf's).
> 
> Hm.  Any suggestions on where to start?  Am I right that it should try to
> convert from cp932, fail, and then try utf8?  Is there anything I can do
> with the iconv command that could demonstrate that there's something wrong
> with iconv on the system?

Does Solaris have S_ISFIFO()?  If not, it might happen.
Could you try the attached patch?


> Am I right that it should try to
> convert from cp932, fail, and then try utf8?

Yes, right.

Regards,
Ken Takata

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# HG changeset patch
# Parent  4b9116734e30ebc49a24b2e972c86df402d39499

diff --git a/src/buffer.c b/src/buffer.c
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -216,9 +216,13 @@ open_buffer(
 	if (perm >= 0 && (0
 # ifdef S_ISFIFO
 		      || S_ISFIFO(perm)
+# elif defined(S_IFIFO)
+		      || ((perm & S_IFMT) == S_IFIFO)
 # endif
 # ifdef S_ISSOCK
 		      || S_ISSOCK(perm)
+# elif defined(S_IFSOCK)
+		      || ((perm & S_IFMT) == S_IFSOCK)
 # endif
 		    ))
 		read_fifo = TRUE;

Raspunde prin e-mail lui