有没有可以处理 UTF-8 字符的 diff 工具?

发布于 2024-12-14 04:56:24 字数 396 浏览 5 评论 0原文

我正在寻找可以处理 UTF-8 字符的命令行程序 (Windows) 或 PHP 库。

我已经搜索过,并且已阅读这些问题:

但没有运气。

感谢您的帮助!

I'm looking for a command line program (Windows) or a PHP library that can handle UTF-8 characters.

I've searched SO and I have read these questions:

but with no luck.

Thanks for help!

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

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

发布评论

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

评论(5

沉溺在你眼里的海 2024-12-21 04:56:25

WinMerge 可以处理UTF-8(需要启动Unicode版本的WinMergeU.exe)

WinMerge can handle UTF-8 (you need to start the Unicode version WinMergeU.exe)

羅雙樹 2024-12-21 04:56:25

ECMerge 文本的内部表示形式是 UTF8(注意:我在 ECMerge 工作)。它为我们提供了一个命令行工具 ecmerge-cli (在 Windows 上,在 Unix 上为 ecmerge --cli)。从 PHP 调用它应该像任何其他命令行工具一样简单。它可以编写脚本并输出您需要的任何内容。当然,它可以生成现成的 HTML/XML diff 报告和补丁。
它已成功实现为 Web 服务器背后的多个差异服务的基础。

ECMerge internal representation of text is UTF8 (NB: I work for ECMerge). It comes we a command line tool ecmerge-cli (on Windows, ecmerge --cli on Unixes). Calling it from PHP should as simple as any other command line tools. It can be scripted and output whatever you need. Of course it can generate HTML/XML diff reports and patches off the shelf.
It is succesfully implemented as the base for several diff services behind web servers.

温柔嚣张 2024-12-21 04:56:25

你尝试过我最喜欢的——超越吗?

Did you try my favorite -- beyond compare?

花之痕靓丽 2024-12-21 04:56:24

我最终选择了 Prettydiff.com。它既不是 PHP 库也不是程序,但它可以满足我的需要。

I've end up with prettydiff.com. It is not either PHP lib or a program but it works for what I need.

全部不再 2024-12-21 04:56:24

幸运的是...

我们的智能差异器工具可以处理各种各样的输入编码。您可以将输入编码定义为环境变量,因此如果您进行大量比较,您可能需要编写一个小脚本。 (我们正在努力允许它作为命令行开关)。

这些工具旨在比较计算机语言,并且是特定于语言的。
有一个版本专门用于比较 PHP 程序。

如果您想要的只是普通的文本差异,那么这不是您的工具。
[这让我考虑由文本行组成的“简单的计算机语言”,
这个工具会做得很好。我要去建造其中之一
(使用我们的机器真的很容易)只是为了看看它是什么样的。敬请关注
到这个蝙蝠频道。]

As luck would have it...

Our Smart Differencer tools handle a huge variety of input encodings. You can define the input encoding as an environment variable, so if you do a lot of compares you might want to write a little script. (We're moving towards allowing this as a command line switch).

These tools are designed to compare computer langauges, and are langauge specific.
There's a version specifically to compare PHP programs.

If all you want is a plain vanilla text diff, this won't be your tool.
[This makes me consider the "trivial computer language" consisting of text lines,
which this tool would do really well. I'll have go build one of these
(really easy with our machinery) just to see what it is like. Stay tuned
to this Bat channel.]

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