Skip to content

AI Browser for iPad v2.2.2

Choose a tag to compare

@felixshine2009-cmd felixshine2009-cmd released this 13 Nov 05:28
· 50 commits to main since this release

AI 浏览器 iPad 版 v2.2.2

修复版本:解决 v2.2.1 在真机上启动时报“主程序(main.js)加载失败:The "big5" encoding is not supported”的问题。

修复:主程序加载失败(big5 编码不受支持)

  • 原因:内置的 Node.js 运行时(nodejs-mobile)在 iOS 上不含 ICU 国际化数据,其文本解码器(TextDecoder)只支持 UTF-8 和 UTF-16LE。词典模块在加载时即创建 BIG5 与 GB18030 解码器,因此抛出异常,导致整个主程序无法加载。模拟宿主此前使用带完整 ICU 的 Node.js,未能暴露该问题。
  • 修复:在主程序之前加载文本解码兼容层。运行时自带解码器不支持的编码(BIG5、GB18030、GBK、GB2312、Shift_JIS、EUC-JP、EUC-KR、UTF-16BE、Windows-125x、ISO-8859 系列、KOI8 等)以及 fatal 选项,改由纯 JavaScript 实现的 iconv-lite(MIT 许可)解码,支持流式解码。
  • 词典解析模块改为首次使用时才加载;即使其加载失败,也只影响词典功能,不再影响主程序启动。
  • 以 BIG5、GBK 等编码返回的网页,其正文提取同样恢复正常。

兼容性审查

已在与 iPad 相同条件(Node.js 18、无 ICU、无 JIT)下检查主进程代码及其依赖:不使用 Intl;排序、数字与日期格式化、Unicode 规范化在无 ICU 时不会出错;除文本解码器外未发现其他启动时故障。

测试与持续集成

  • 持续集成新增以 --with-intl=none 方式编译的 Node.js 18(与 nodejs-mobile 相同),模拟宿主上的 iPad 测试改为在该运行时上、以无 JIT 方式运行。
  • 新增设备运行时检查:在无 ICU、无 JIT 条件下验证各类编码的解码结果,并逐一加载主进程依赖的模块。
  • 本地已在上述条件下通过全部 23 项 iPad 模拟宿主测试与词典测试。
  • 构建流程在不同 macOS 构建机镜像上自动选择可用的 Xcode。

下载

文件 说明
AI-Browser-iPad-unsigned.ipa 未签名的 iPad 安装包(iPadOS 16 及以上),由 CI 构建后附加

AI Browser for iPad v2.2.2

A fix release. It resolves the startup failure of v2.2.1 on real devices: "主程序(main.js)加载失败: The "big5" encoding is not supported".

Fix: main program failed to load (big5 encoding not supported)

  • Cause: the embedded Node.js runtime (nodejs-mobile) is built without ICU internationalisation data on iOS, so its TextDecoder supports only UTF-8 and UTF-16LE. The dictionary module creates BIG5 and GB18030 decoders when it loads, which threw an exception and prevented the whole main program from loading. The simulated host previously used a Node.js with full ICU and did not expose the problem.
  • Fix: a text decoding compatibility layer is loaded before the main program. Encodings the built-in decoder does not support (BIG5, GB18030, GBK, GB2312, Shift_JIS, EUC-JP, EUC-KR, UTF-16BE, Windows-125x, the ISO-8859 family, KOI8 and others), as well as the fatal option, are decoded by iconv-lite (MIT licence), written in plain JavaScript, including streamed decoding.
  • The dictionary parser is now loaded on first use. Should it fail to load, only the dictionary feature is affected; the main program still starts.
  • Text extraction from web pages served in BIG5, GBK and similar encodings works again as well.

Compatibility review

The main-process code and its dependencies were checked under the same conditions as on iPad (Node.js 18, no ICU, no JIT): Intl is not used; sorting, number and date formatting and Unicode normalisation do not fail without ICU; apart from the text decoder, no other startup failure was found.

Tests and continuous integration

  • CI now builds Node.js 18 with --with-intl=none (as nodejs-mobile is built), and the iPad test on the simulated host runs on that runtime without a JIT.
  • A new device runtime check verifies decoding results for many encodings and loads every module the main process depends on, without ICU and without a JIT.
  • All 23 iPad tests on the simulated host and the dictionary tests passed locally under these conditions.
  • The build selects an available Xcode on every macOS runner image.

Download

File Description
AI-Browser-iPad-unsigned.ipa Unsigned iPad app (iPadOS 16 or later), attached by CI after the build

Created by Grok