Bitcointalk · wxWidgets 2.9.0

中本聪,2010 年 2 月 27 日

SN-0421 已核对来源,附原文与上下文。

阅读语言
中文译文

翻了 2.8.10 的源码,看起来那个版本也能做 unicode

在 Windows 世界里,"unicode" 指的是 UTF-16(wchar)。

2.8 有两种构建变体:ANSI 和 UTF-16(unicode)。Debian 包里提供的 "unicode" 版就是 UTF-16 版。我认为论坛里描述的构建问题,其根源正是 2.8 及其被简单标注为 "unicode" 的 UTF-16 构建。我们此前用 2.8 ANSI,就是为了期待直达 UTF-8、避开 UTF-16 的地狱。我们无法用 UTF-16 编译。

2.9 只有一个版本,UTF-8。在 Windows 上我们把代码页设为 UTF-8,于是所有平台上我们的代码都是 UTF-8,wxWidgets 与我们的接口也是 UTF-8。在 Linux 上我猜代码页本来就是 UTF-8。统一到 2.9 就避开了 2.8 的多构建混乱,而且我们需要 2.9 来做 UTF-8 国际化。

务必读一下 build-unix.txt,用给出的 configure 参数来配置 wxWidgets。

好奇问一句:提供 wxWidgets 2.9.0 为什么会"极难"?如果你指的是对用户而言,这正是我们静态链接它的原因。

我们需要这么多大型依赖,确实遗憾,但缺一不可。至少在 Debian/Ubuntu 上,除 wxWidgets 外全都有包。他们最终会提供 2.9 包的。

ORIGINAL · 英文原文
Looking through the source of 2.8.10 it appears that unicode is possible with that version too.
In the Windows world, "unicode" means UTF-16 (wchar).

2.8 has two build variations, ANSI and UTF-16 (unicode).  The UTF-16 version is the "unicode" version provided in the Debian package.  I believe 2.8 and its UTF-16 build labelled simply "unicode" has been the source of build problems described in the forum.  We were previously using 2.8 ANSI in anticipation of getting to UTF-8 without going through UTF-16 hell.  We cannot compile with UTF-16.

2.9 has only one version, UTF-8.  On Windows, we set the codepage to UTF-8, so on all platforms our code is UTF-8 and wxWidgets interfaces with us in UTF-8.  On Linux I assume the codepage is already UTF-8.  By standardizing on 2.9 we avoid the multi-build confusion of 2.8, and we need 2.9 for UTF-8 internationalization.

Make sure you read build-unix.txt and configure wxWidgets using the configure parameters given.

Curious, why is it incredibly hard to provide wxWidgets 2.9.0?  If you mean for users, that's why we static link it.

It's unfortunate that we require so many big dependencies, but we need them all.  At least on Debian/Ubuntu, all but wxWidgets are available as packages.  Eventually they'll provide a 2.9 package.
上下文
← 上一条 SN-0421 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0421