views:

116

answers:

3

Hi,

I'm using Par (in linux) to get nice comments formatting quickly. The problem is that now I want to introduce comments that include some international characters, like áéíóú or äëïöü...

The program Berkeley Par considers these international characters as 2 ASCII characters (I believe) and it outputs the comments somehow broken because it doesn't count characters properly.

Did you face this problem before? Do you have any solution? Ideas?

+1  A: 

I've never even heard of this tool, but check out par 1.52.

The latest version of Par, released on 2001-Apr-29, tar'd and gzip'd. The only real change is better support for 8-bit character sets (as opposed to just 7-bit ASCII), but see also the release notes.

Edit: On the page, see par_1.52-i18n.3.diff.gz:

A patch by Jérôme Pouiller that adds support for multibyte charsets (like UTF-8), plus Debian packaging. Copied from http://sysmic.org/par/debian/. See also his original announcement.

eed3si9n
This program is the same one I'm using, including version number. I don't know why sometimes is known as Berkley Par :)However, is not supporting it. Maybe is a gentoo linux problem building it? :S
alvatar
Actually compiling this version doesn't work right with the UTF-8 characters either...
alvatar
A: 

Par, as distributed in Ubuntu from Hardy on, is supposed to handle multi-byte encodings.

http://packages.ubuntu.com/hardy/par

Piotr Findeisen
+1  A: 

You mean the code from Add multibyte characters support in "par" (or just the patches applied to the original source) don't work for you?

Then maybe it is a problem with your shell or the font it uses. Are you sure the shell and font you use is able to reproduce unicode characters

jitter
Thanks a lot!!!!!! This works. Is not the same as distributed in Gentoo Linux nor the one you can find in the original web page.
alvatar