Re: mutt (stable/snapshost) new pkg/MESSAGE

2011-05-02 Thread LEVAI Daniel
On Mon, May 02, 2011 at 12:56:31 +0200, Stefan Sperling wrote:
> Why are you mixing en_US and hu_HU?
> 
[...]
> So try this:
>   LC_CTYPE=hu_HU.UTF-8
>   LANG=hu_HU.UTF-8
>   LC_MESSAGES==hu_HU.UTF-8
I need english messages, hence the LC_MESSAGE=en_US. For everything else I
use hu_HU, except for LC_CTYPE, because I thought I can only use en_US
for that, but not I'm using hu_HU for that too.

> The hu_HU.UTF-8 LC_CTYPE locale is available by default in 4.9.
Thanks, now I'm using it.

[...]
> Maybe it's because of 'set nocompatible'?
Yes, I had mixed it with set compatible.


Thank you, now everything works as expected :)


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F



Re: mutt (stable/snapshost) new pkg/MESSAGE

2011-05-02 Thread Stefan Sperling
On Mon, May 02, 2011 at 11:04:45AM +0200, LEVAI Daniel wrote:
> On Mon, May 02, 2011 at 10:51:05 +0200, Stefan Sperling wrote:
> > On Mon, May 02, 2011 at 10:38:03AM +0200, LEVAI Daniel wrote:
> > > Hi!
> > > 
> > > I've finally got around a problem when using UTF-8 encoding and mutt +
> > > vim. Here is the solution; if you think it's worth including, then
> > > please do it.
> > 
> > Things work perfectly for me without any of these settings in .vimrc.
> > 
> > How are you setting your locale and what terminal/fonts are you using?
> LANG='hu_HU'
> LC_CTYPE='en_US.UTF-8'
> LC_TIME='hu_HU'
> LC_COLLATE='hu_HU'
> LC_MONETARY='hu_HU'
> LC_MESSAGES='en_US.UTF-8'
> LC_PAPER='hu_HU'
> 

Why are you mixing en_US and hu_HU?

The only category that has an effect for libc is LC_CTYPE.
The others are ignored by libc.
>From setlocale(3):
  BUGS
   The current implementation supports only the "C" and "POSIX" locales for
   all but the LC_CTYPE locale.

However, some applications (and gettext) might peek at LANG which is treated
like LC_ALL. If LANG and LC_ALL aren't set apps may look at LC_MESSAGES.

So try this:
  LC_CTYPE=hu_HU.UTF-8
  LANG=hu_HU.UTF-8
  LC_MESSAGES==hu_HU.UTF-8

Though setting just LANG should suffice.
The other LC_ variables have no effect on OpenBSD.

The hu_HU.UTF-8 LC_CTYPE locale is available by default in 4.9.
It's trivial to add it to 4.8 systems:
  mkdir /usr/share/locale/hu_HU.UTF-8
  ln /usr/share/locale/en_US.UTF-8/LC_CTYPE /usr/share/locale/hu_HU.UTF-8/

> > I've attached my .vimrc for reference. Does it work for you?
> Yes :/
> I'm confused.

Maybe it's because of 'set nocompatible'?



Re: mutt (stable/snapshost) new pkg/MESSAGE

2011-05-02 Thread LEVAI Daniel
On Mon, May 02, 2011 at 10:51:05 +0200, Stefan Sperling wrote:
> On Mon, May 02, 2011 at 10:38:03AM +0200, LEVAI Daniel wrote:
> > Hi!
> > 
> > I've finally got around a problem when using UTF-8 encoding and mutt +
> > vim. Here is the solution; if you think it's worth including, then
> > please do it.
> 
> Things work perfectly for me without any of these settings in .vimrc.
> 
> How are you setting your locale and what terminal/fonts are you using?
LANG='hu_HU'
LC_CTYPE='en_US.UTF-8'
LC_TIME='hu_HU'
LC_COLLATE='hu_HU'
LC_MONETARY='hu_HU'
LC_MESSAGES='en_US.UTF-8'
LC_PAPER='hu_HU'

terminal is urxvt and the font is terminus.

> Do you have any encoding/charset/editor related settings in .muttrc?
set assumed_charset='iso-8859-1//TRANSLIT:iso-8859-2//TRANSLIT:utf-8'
set locale='en_US.UTF-8'

> I've attached my .vimrc for reference. Does it work for you?
Yes :/
I'm confused.


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F



Re: mutt (stable/snapshost) new pkg/MESSAGE

2011-05-02 Thread Stefan Sperling
On Mon, May 02, 2011 at 10:38:03AM +0200, LEVAI Daniel wrote:
> Hi!
> 
> I've finally got around a problem when using UTF-8 encoding and mutt +
> vim. Here is the solution; if you think it's worth including, then
> please do it.

Things work perfectly for me without any of these settings in .vimrc.

How are you setting your locale and what terminal/fonts are you using?
Do you have any encoding/charset/editor related settings in .muttrc?

I've attached my .vimrc for reference. Does it work for you?

> Index: snapshot/pkg/MESSAGE
> ===
> RCS file: snapshot/pkg/MESSAGE
> diff -N snapshot/pkg/MESSAGE
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ snapshot/pkg/MESSAGE  2 May 2011 08:32:18 -
> @@ -0,0 +1,8 @@
> +If you are experiencing character display issues while replying to a
> +message when using Vim as editor, try including the following in your
> +~/.vimrc:
> +
> +set encoding&" terminal charset: follows current locale
> +set termencoding=
> +set fileencodings=   " charset auto-sensing: disabled
> +set fileencoding&" auto-sensed charset of current buffer
> Index: stable/pkg/MESSAGE
> ===
> RCS file: stable/pkg/MESSAGE
> diff -N stable/pkg/MESSAGE
> --- /dev/null 1 Jan 1970 00:00:00 -
> +++ stable/pkg/MESSAGE2 May 2011 08:32:18 -
> @@ -0,0 +1,8 @@
> +If you are experiencing character display issues while replying to a
> +message when using Vim as editor, try including the following in your
> +~/.vimrc:
> +
> +set encoding&" terminal charset: follows current locale
> +set termencoding=
> +set fileencodings=   " charset auto-sensing: disabled
> +set fileencoding&" auto-sensed charset of current buffer
> 
> 
> Daniel
> 
> -- 
> LÉVAI Dániel
> PGP key ID = 0x83B63A8F
> Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F
set nocompatible
set backspace=2
set autoindent
set shiftwidth=8
if has("mouse")
set mouse=a
endif
set showcmd
set ruler
set hlsearch
set noincsearch
set nobackup
set modeline
set noexpandtab
set wildmode=longest:list
filetype plugin on

source $VIMRUNTIME/ftplugin/man.vim
au BufNewFile,BufRead  svn-commit.* setf svn

"subversion code layout
if (getcwd() =~ 'svn/svn-')
set tabstop=2 shiftwidth=2 expandtab
endif

if has("syntax")
syntax on
endif
hi Comment  ctermfg=darkgreen
hi Statementctermfg=red
hi PreProc  ctermfg=darkcyan
hi Constant ctermfg=darkcyan
hi Identifier   ctermfg=blue
hi SpecialKey   ctermfg=lightgreen
hi Directoryctermfg=lightgreen
hi htmlLink ctermfg=lightblue
hi Search   ctermfg=black ctermbg=yellow
hi IncSearchctermfg=black ctermbg=yellow
hi Pmenuctermbg=yellow guibg=yellow ctermfg=black guifg=black
hi PmenuSel ctermbg=yellow guibg=yellow ctermfg=darkred guifg=red
hi PmenuSbarctermbg=yellow guibg=yellow ctermfg=blue guifg=blue
hi IncSearchterm=standout cterm=bold ctermfg=7 ctermbg=1 guifg=White 
guibg=Red

if has("gui_running")
set guifont=Monospace\ 10
"set guioptions+=f
set lines=24 columns=80
colorscheme desert
"colorscheme morning
endif


mutt (stable/snapshost) new pkg/MESSAGE

2011-05-02 Thread LEVAI Daniel
Hi!

I've finally got around a problem when using UTF-8 encoding and mutt +
vim. Here is the solution; if you think it's worth including, then
please do it.


Index: snapshot/pkg/MESSAGE
===
RCS file: snapshot/pkg/MESSAGE
diff -N snapshot/pkg/MESSAGE
--- /dev/null   1 Jan 1970 00:00:00 -
+++ snapshot/pkg/MESSAGE2 May 2011 08:32:18 -
@@ -0,0 +1,8 @@
+If you are experiencing character display issues while replying to a
+message when using Vim as editor, try including the following in your
+~/.vimrc:
+
+set encoding&  " terminal charset: follows current locale
+set termencoding=
+set fileencodings= " charset auto-sensing: disabled
+set fileencoding&  " auto-sensed charset of current buffer
Index: stable/pkg/MESSAGE
===
RCS file: stable/pkg/MESSAGE
diff -N stable/pkg/MESSAGE
--- /dev/null   1 Jan 1970 00:00:00 -
+++ stable/pkg/MESSAGE  2 May 2011 08:32:18 -
@@ -0,0 +1,8 @@
+If you are experiencing character display issues while replying to a
+message when using Vim as editor, try including the following in your
+~/.vimrc:
+
+set encoding&  " terminal charset: follows current locale
+set termencoding=
+set fileencodings= " charset auto-sensing: disabled
+set fileencoding&  " auto-sensed charset of current buffer


Daniel

-- 
LÉVAI Dániel
PGP key ID = 0x83B63A8F
Key fingerprint = DBEC C66B A47A DFA2 792D  650C C69B BE4C 83B6 3A8F