Am Sonntag, 11. November 2012 10:03:49 UTC+1 schrieb ZyX:
> > Is this intended? Is there an (easy) way to make printf() respect 
> > multi-byte encodings?
> It is clearly stated in documentation that printf() operates with bytes.

My question rather was am I missing something since I personally find this 
behaviour rather useless in the context of a text editor.

A formatted string usually is something that should eventually be displayed in 
a vim buffer. When I want to get a string padded with whitespace, I'm almost 
always rather interested in its display width than in its size in bytes -- and 
I can hardly imagine a use case where it would be otherwise.

I can work around this problem by adjusting the width dependent on the 
difference between len(s) and strwidth(s) but I personally find this 
unnecessarily complicated.

-- 
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

Raspunde prin e-mail lui