使用 par 使用国际字符格式化代码中的注释

发布于 2024-07-25 17:15:51 字数 209 浏览 2 评论 0原文

我正在使用 Par(在 Linux 中)来快速获得良好的注释格式。 问题是现在我想引入包含一些国际字符的注释,例如 áéíóú 或 äëïöü...

Berkeley Par 程序将这些国际字符视为 2 个 ASCII 字符(我相信),并且它输出的注释以某种方式损坏,因为它不'正确计算字符数。

您以前遇到过这个问题吗? 你有什么解决办法吗? 有想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

挽梦忆笙歌 2024-08-01 17:15:52

您的意思是来自 在“par”中添加多字节字符支持(或者只是应用于原始源的补丁)不适合您?

那么可能是你的 shell 或其使用的字体有问题。 您确定您使用的 shell 和字体能够重现 unicode 字符吗

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

妳是的陽光 2024-08-01 17:15:52

Par,从 Hardy 开始在 Ubuntu 中分发,应该处理多字节编码。

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

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

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

疏忽 2024-08-01 17:15:52

我从来没有听说过这个工具,但请查看 par 1.52

Par 的最新版本于 2001 年 4 月 29 日发布,经过 tar 和 gzip 处理。 唯一真正的变化是更好地支持 8 位字符集(而不是仅 7 位 ASCII),但另请参阅 发行说明

编辑:在页面上,参见 par_1.52-i18n.3.diff.gz

Jérôme Pouiller 的补丁添加了
支持多字节字符集(例如
UTF-8),加上 Debian 包装。 已复制
来自http://sysmic.org/par/debian/
另请参阅他的原文公告.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文