Date: Mon, 26 Jan 2009 22:58:06 +0100 From: Svein Halvor Halvorsen <svein.h@lvor.halvorsen.cc> To: questions@freebsd.org Subject: printf and utf-8 Message-ID: <497E31EE.9010202@lvor.halvorsen.cc>
next in thread | raw e-mail | index | archive | help
As far as I can see, printf is not calculating strings lengths correctly when using utf-8 encoding. Either that, or I'm using byte count, and can't find the character count :-/ Eg: $ printf "|%-10s|" "זרו" |זרו | $ printf "|%-10s|" "123" |123 | I'm on 7.1-p2 sv.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?497E31EE.9010202>