
shenleiandClaude Opus 5
389b643863
docs: 记录 Android GBK 编解码的已知问题(挂起)
用户决定:先保证 macOS 可用,Android 后期再想办法。本次只记录根因,
不动 text_codec.cpp。
症状:build-android.sh 默认 API 24 下 extension/src/net/text_codec.cpp 报
use of undeclared identifier 'iconv_open'。
根因:text_codec.cpp:10 用 __has_include(<iconv.h>) 探测;NDK 里该头在任何
API 等级都存在,但声明被 __BIONIC_AVAILABILITY_GUARD(28) 挡住。用
NDK 28.2 的 clang++ -fsyntax-only 实测:android24 报 3 处 undeclared,
android28 通过。
但升 API 不是解法:NDK iconv.h 写明 bionic 只支持 utf8/ascii/usascii/
utf16{be,le}/utf32{be,le}/wchart,没有 GB2312/GBK。升到 28 后
iconv_open("GB2312","UTF-8") 运行期返回 -1,encode_one()/decode_wire()
对所有输入都返回 false——连纯 ASCII 也被拒,比现有 #else 的 ASCII 回退
分支(text_codec.cpp:104-127)更糟。且 APK min_sdk 要跟着 >=28,
config/android/pyconfig.h 是 API 24 下 configure 的,需返工。
将来的修法写进了 PORT-PLAN 的新小节。
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-23 09:57:27 +09:00
..
2026-09-08 17:15:17 +09:00
2026-09-08 17:15:17 +09:00
2026-09-08 17:15:17 +09:00
2026-09-01 18:49:28 +09:00
2026-09-21 16:38:59 -07:00
2026-09-21 16:38:59 -07:00
2026-09-19 08:51:25 -07:00
2026-09-22 18:20:14 +09:00
2026-09-19 08:51:25 -07:00
2026-09-11 14:58:22 +08:00
2026-09-08 17:15:17 +09:00
2026-09-08 17:15:17 +09:00
2026-09-04 19:54:33 +09:00
2026-09-19 08:51:25 -07:00
2026-09-23 09:53:28 +09:00
2026-09-23 09:57:27 +09:00
2026-09-23 09:53:28 +09:00
2026-09-11 14:58:22 +08:00
2026-09-08 17:15:17 +09:00
2026-09-23 09:53:28 +09:00