Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Egmont Koblinger
On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz Kłoczko wrote:

 BTW: anyone is working on UFT-8 support for ncurses(w) backend ?

I don't think so, and I don't think it is worth it. Maintaining two backends
IMHO just causes headaches while it doesn't make mc better. I still can't
see why developers do not decide which one to use and drop the other one.

With Unicode support maintaining the two will be much harder since AFAIK
slang works with UTF-8 while ncurses uses UCS-4. Hence a completely
different patch would be required for the two cases.

 BTW2: few monts ago was on this list about converting in source 
 tree alle po/*.po files to UTF-8 .. still not done. Any reasons ?
 
 It can be performed by:
 
 [mc]$ for i in po/*.po; do msgconv -t UTF-8 $i -o $i; done

Are you sure it is safe to use the same output file? I'd rather use a tmp
file. It depends on msgconv's internal implementation, but I can easily
imagine a situation where the writing file descriptor's position exceeds the
reading position (since UTF-8 is longer than the 8-bit version) and this may
cause invalid results. Due to buffered read and write requests I guess it
needs larger files (with approx. 4096 -- 8192 accented characters) for this
bug to occur. I'm not sure, though, just reasonably paranoid :-)



-- 
Egmont
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Vladimir Nadvornik
On Monday 12 June 2006 10:55, Jindrich Novy wrote:

  Please take notice. It would probably be good if Vladimir and you could
  keep your UTF-8 patch sets in sync. It just seems wasted effort to do
  this in two places independently. Some inter-distro communication is not
  going to hurt. Maybe these patches should be centrally maintained in a
  contribs tree.

 The problem is that Vladimir and me use different versions of mc. My
 approach is to be more in sync with upstream so that there's a more
 recent CVS snapshot in Fedora for now because of a very rare release
 period of mc. This helps me to do only minimal changes when I want to
 send a patch to upstream. SuSE uses the stable mc-4.6.1, AFAIK.

It would not be a problem to have a more recent mc snapshot in 
openSUSE Factory. Even better, if it is synced with Fedora.

 +1 for storing useful patches in contrib. It would be quite hard to keep
 them in sync with devel mc though.

Good idea.

However we need a long-term solution. We should discuss what must be done
to have UTF support in upstream.

-- 
Vladimir Nadvornik
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Bart Oldeman
On Wed, 14 Jun 2006, Egmont Koblinger wrote:

 On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz K?oczko wrote:

 BTW: anyone is working on UFT-8 support for ncurses(w) backend ?

 I don't think so, and I don't think it is worth it. Maintaining two backends
 IMHO just causes headaches while it doesn't make mc better. I still can't
 see why developers do not decide which one to use and drop the other one.

Maybe compatibility with older UN*Xes with curses but no slang?

 With Unicode support maintaining the two will be much harder since AFAIK
 slang works with UTF-8 while ncurses uses UCS-4. Hence a completely
 different patch would be required for the two cases.

Last time I played with it ncursesw (but not plain ncurses) handled UTF-8 
just fine.

e.g. you can pass a UTF-8 encoded string to addstr(), and provided the
locale is set correctly, ncursesw will compute its width correctly. It is 
*also* possible to use addwstr() with UCS-4, but not compulsory.

Bart

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Pavel Roskin
Hello!

On Thu, 2006-06-15 at 09:45 +1200, Bart Oldeman wrote:
 On Wed, 14 Jun 2006, Egmont Koblinger wrote:
 
  On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz K?oczko wrote:
 
  BTW: anyone is working on UFT-8 support for ncurses(w) backend ?
 
  I don't think so, and I don't think it is worth it. Maintaining two backends
  IMHO just causes headaches while it doesn't make mc better. I still can't
  see why developers do not decide which one to use and drop the other one.
 
 Maybe compatibility with older UN*Xes with curses but no slang?

It's a bogus argument.  UNIX curses was removed long ago, and it had
never worked well anyway.  I don't remember a single person complaining.
Besides, S-Lang is included with mc and it's quite portable.

-- 
Regards,
Pavel Roskin

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Oswald Buddenhagen
On Thu, Jun 15, 2006 at 09:45:26AM +1200, Bart Oldeman wrote:
 On Wed, 14 Jun 2006, Egmont Koblinger wrote:
  On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz K?oczko wrote:
  BTW: anyone is working on UFT-8 support for ncurses(w) backend ?
 
  I don't think so, and I don't think it is worth it. Maintaining two backends
  IMHO just causes headaches while it doesn't make mc better. I still can't
  see why developers do not decide which one to use and drop the other one.
 
 Maybe compatibility with older UN*Xes with curses but no slang?
 
that doesn't sound too convincing.

  With Unicode support maintaining the two will be much harder since AFAIK
  slang works with UTF-8 while ncurses uses UCS-4. Hence a completely
  different patch would be required for the two cases.
 
 Last time I played with it ncursesw (but not plain ncurses) handled UTF-8 
 just fine.
 
good.

i'm all for killing slang support. why that one? libslang is twice as
big as libncursesw. probably because it was meant to be much more than
just a display lib.

-- 
Hi! I'm a .signature virus! Copy me into your ~/.signature, please!
--
Chaos, panic, and disorder - my work here is done.
___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Tomasz Kłoczko

On Wed, 14 Jun 2006, Egmont Koblinger wrote:


On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz Kłoczko wrote:


BTW: anyone is working on UFT-8 support for ncurses(w) backend ?


I don't think so, and I don't think it is worth it. Maintaining two backends
IMHO just causes headaches while it doesn't make mc better. I still can't
see why developers do not decide which one to use and drop the other one.


If someone want ask which backend is more importand and will be better 
keep as major IMO answer tn this kind question is very simple:


# rpm -q --whatrequires libslang.so.2 | grep -v slang | wc -l
4
# rpm -q --whatrequires libncurses.so.5 libncursesw.so.5 | grep -v ncurses |wc 
-l
55

Above slang list contain only packages which do not have now ncurses 
backend and are not importand as mc :)
Also current state have other sick points on Linux. In case using mc with 
gpm it causes runtime linking with more than one term toolkit library 
(slang or internal slang and ncurses used by libgpm).


[..]

[mc]$ for i in po/*.po; do msgconv -t UTF-8 $i -o $i; done


Are you sure it is safe to use the same output file? I'd rather use a tmp
file.


I'm sure. msgconv cumulates output in memory and aftewr finish conversion 
writes output to file name passed in -o parameter in single step.


kloczek
--
---
*Ludzie nie mają problemów, tylko sobie sami je stwarzają*
---
Tomasz Kłoczko, sys adm @zie.pg.gda.pl|*e-mail: [EMAIL PROTECTED]___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: utf8 patch for mc, slang 2 version

2006-06-14 Thread Pavel Tsekov
On Wed, 14 Jun 2006, Pavel Roskin wrote:

 Hello!

 On Thu, 2006-06-15 at 09:45 +1200, Bart Oldeman wrote:
 On Wed, 14 Jun 2006, Egmont Koblinger wrote:

 On Tue, Jun 13, 2006 at 07:14:41PM +0200, Tomasz K?oczko wrote:

 BTW: anyone is working on UFT-8 support for ncurses(w) backend ?

 I don't think so, and I don't think it is worth it. Maintaining two backends
 IMHO just causes headaches while it doesn't make mc better. I still can't
 see why developers do not decide which one to use and drop the other one.

 Maybe compatibility with older UN*Xes with curses but no slang?

 It's a bogus argument.  UNIX curses was removed long ago, and it had
 never worked well anyway.  I don't remember a single person complaining.
 Besides, S-Lang is included with mc and it's quite portable.

We had that argument once already. curses is not that old and it is
standard. And it has unicode support. Its just a matter of using it.

___
Mc-devel mailing list
http://mail.gnome.org/mailman/listinfo/mc-devel