Bug 86355 - vim incorrectly wraps long lines for multibyte locales (UTF-8)
Summary: vim incorrectly wraps long lines for multibyte locales (UTF-8)
Alias: None
Product: Fedora
Classification: Fedora
Component: vim
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Karsten Hopp
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-20 09:57 UTC by Alexey Neyman
Modified: 2007-11-30 22:10 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-10-05 13:03:48 UTC
Type: ---

Attachments (Terms of Use)
The escape-looking characters are outlined with red. (115.06 KB, image/png)
2003-03-20 09:59 UTC, Alexey Neyman
no flags Details
A small test case; try vi'ing it with ru_RU.UTF-8 locale set (404 bytes, text/plain)
2003-03-20 21:27 UTC, Alexey Neyman
no flags Details

Description Alexey Neyman 2003-03-20 09:57:19 UTC
Description of problem:  
See the screenshot; the problem is outlined with red line. If the line 
consists of multibyte characters (in this screenshot they are cyrillic) 
vim outputs something that looks like escape-sequences. 
The screenshot was made with a file in koi8-r encoding that was 
automatically converted to utf-8 by vim. However, this seems irrelevant 
as the same happens with files in utf-8 encoding. 
Version-Release number of selected component (if applicable):  
How reproducible:  
Steps to Reproduce:  
1. Create a file with cyrillic characters and long lines that will be wrapped 
(to ensure the appearance of the bug make a line solely of cyrillic) 
2. Save it to disk 
3. Open it again 
4. Look for escape-looking pieces

Comment 1 Alexey Neyman 2003-03-20 09:59:40 UTC
Created attachment 90673 [details]
The escape-looking characters are outlined with red.

Comment 2 Karsten Hopp 2003-03-20 20:57:19 UTC
Can you please download the vim packages from http://people.redhat.com/karsten/
and test if they fix your problem ?

Comment 3 Alexey Neyman 2003-03-20 21:13:59 UTC
I've just tried; the problem persists just as it were. 

Comment 4 Alexey Neyman 2003-03-20 21:27:20 UTC
Created attachment 90679 [details]
A small test case; try vi'ing it with ru_RU.UTF-8 locale set

I have just tried it in text console; it looked fine. However; in Konsole (KDE
terminal) this produces such output. Don't know if it is KDE's fault...

If the test case does not produce illegal output for you, I'll try to reproduce
it on another RH8.0 host tomorrow.

Comment 5 Alexey Neyman 2003-03-21 06:29:56 UTC
I have just tried it on another RH8.0 host; it works. 
I have upgraded ncurses to 5.3-4 (from rawhide); however, downgrading it to 
5.2-28 package (that comes with RH8.0) won't help either. 
I can provide any additional information (RPM's installed, configuration 
files) upon request. 

Comment 6 Alexey Neyman 2003-03-21 06:47:38 UTC
Well, it seems that the cause is the update due to RHSA-2002:297-17 advisory. 
I copied the /bin/vi binary from the host that was not updated and still has 
vim-*-6.1-14; and that binary worked as expected. 
I hope that helps to nail it down ;) 

Comment 7 Karsten Hopp 2005-01-25 12:21:21 UTC
Problem doesn't look like a vim bug to me as it is dependent on which
terminal you use. konsole and xterm show this bug at certain terminal
widths, gnome-terminal seems to be ok.

Comment 8 Than Ngo 2005-01-25 12:43:35 UTC
i have done some testing here. less, cat and emacs does not have this
problem on konsole and xterm. If the problem does not appear with
vim-*-6.1-14, it seems a vim bug here!

Comment 9 Karsten Hopp 2005-10-05 13:03:48 UTC
cannot reproduce it anymore on a rawhide system, closing...

Note You need to log in before you can comment on or make changes to this bug.