delphi - RAR 文件中的非 ASCII 文件名是如何编码的?

标签 delphi character-encoding file-format rar

我有一个 RAR 文件,文件名中包含非 ASCII 字母。我尝试在 Delphi 中解码它。我的代码对于 ASCII 文件名工作正常,但对于这些文件名却失败了。它不是 WideChar,也不是 UTF8。我在这里找到了 RAR 规范: http://ams.cern.ch/AMS/amsexch/arch/rar/technote.txt 但它没有提到字符编码。 我尝试了 WOTSIT.org,但所有 RAR 链接都已失效(几乎每个链接都已失效;我什至联系了管理员,但他没有回复也没有修复链接)。 似乎不是 8 位编码,但不知道它可能是什么。

最佳答案

这是唯一提及该名称的段落:

0x200 - FILE_NAME contains both usual and encoded
        Unicode name separated by zero. In this case
        NAME_SIZE field is equal to the length
        of usual name plus encoded Unicode name plus 1.

        If this flag is present, but FILE_NAME does not
        contain zero bytes, it means that file name
        is encoded using UTF-8.

看起来是UTF-8,但你说不是。你能再试一次吗?

关于delphi - RAR 文件中的非 ASCII 文件名是如何编码的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11034550/

相关文章:

c++ - blender 波前对象 : number of vertex in face declaration is bigger than the number of all vertices

binary - 帮助逆向工程二进制文件格式的工具

sql-server - 中止具有处理时间限制的 SQL 查询

Delphi 和 Indy - 如何从 IdTCPServer 发送某些内容到特定的 IdTCPClient

java - 使用 Apache POI 写入 Unicode Plane 1 字符

directx - 编译的directx9着色器文件的格式?

delphi - OpenGl 星图

database - 如何解决在 Delphi Firedac 中添加 ADT 字段的错误?

Java Windows-1252 错误字符

encoding - 如何在经典 ASP 中使用 XMLHttp 对象为 POST 设置字符集?