mirror of
https://github.com/bitcookies/winrar-keygen.git
synced 2026-03-11 09:35:31 +00:00
📘 Add UTF8NoBOM support description
This commit is contained in:
parent
f84a00c672
commit
5c77901c1c
2 changed files with 33 additions and 81 deletions
57
README.md
57
README.md
|
|
@ -39,7 +39,7 @@ There are several ways to use it.
|
|||
|
||||
### 3.1 Encoding
|
||||
|
||||
WinRAR Keygen supports `ASCII`, `ANSI` and `UTF-8` encoding types, the corresponding supported characters are listed in the table below.
|
||||
WinRAR Keygen supports `ASCII`, `ANSI` and `UTF8NoBOM` encoding types, the corresponding supported characters are listed in the table below.
|
||||
|
||||
> [!NOTE]
|
||||
> The default is `utf8`, but you can specify the encoding as `ascii` or `ansi`.
|
||||
|
|
@ -48,7 +48,7 @@ WinRAR Keygen supports `ASCII`, `ANSI` and `UTF-8` encoding types, the correspon
|
|||
| -------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| [ascii](https://en.wikipedia.org/wiki/ASCII) | Only full ASCII characters are supported. | <img width="300px" src="assets/ascii-characters-light.svg#gh-light-mode-only"><img width="300px" src="assets/ascii-characters-dark.svg#gh-dark-mode-only"> |
|
||||
| ansi | There is no one fixed ANSI code, usually [Windows-1252](https://en.wikipedia.org/wiki/Windows-1252), but other local codes are also possible. | <img width="300px" src="assets/windows-1252-characters-light.svg#gh-light-mode-only"><img width="300px" src="assets/windows-1252-characters-dark.svg#gh-dark-mode-only"> |
|
||||
| [utf8](https://en.wikipedia.org/wiki/UTF-8) | Support full UTF-8 encoded characters. | ASCII characters, English, 简体中文, 繁體中文, Deutsch, Français, Русский, Italiano, 日本語, 한국어, Lengua española, Ελληνική γλώσσα, et al. |
|
||||
| [utf8](https://en.wikipedia.org/wiki/UTF-8) | Supports UTF-8 without BOM. | ASCII characters, English, 简体中文, 繁體中文, Deutsch, Français, Русский, Italiano, 日本語, 한국어, Lengua española, Ελληνική γλώσσα, et al. |
|
||||
|
||||
### 3.2 License type
|
||||
|
||||
|
|
@ -216,6 +216,7 @@ If you don't want to compile it yourself, you can also go to the [release](https
|
|||
```shell
|
||||
$ vcpkg install mpir:x86-windows-static
|
||||
$ vcpkg install mpir:x64-windows-static
|
||||
$ vcpkg install gmp:x64-windows
|
||||
```
|
||||
|
||||
3. Your `vcpkg` has been integrated into your __Visual Studio__, which means you have run successfully.
|
||||
|
|
@ -248,9 +249,6 @@ Usage:
|
|||
Example:
|
||||
|
||||
winrar-keygen.exe "Github" "Single PC usage license"
|
||||
|
||||
or:
|
||||
winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ASCII rarreg.key
|
||||
```
|
||||
|
||||

|
||||
|
|
@ -271,48 +269,25 @@ dd4ab952600ba16a99236d910bfa995d5f60651ec451f462511507
|
|||
5eede7ed46566b10bf033daa6384062b259194b1acbd0378116064
|
||||
```
|
||||
|
||||
Save the generated information in **ANSI encoding** as `rarreg.key`.
|
||||
Save the generated information in **ASCII encoding** as `rarreg.key`.
|
||||
|
||||
### 6.4 Multi-language support
|
||||
### 6.4 More character support
|
||||
|
||||
Execute the following code in the terminal and configure two paramet
|
||||
In addition to using ASCII encoding, you can use ANSI and UTF8NoBOM to support more characters, but you will need to install [PowerShell 7.4 or later](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4).
|
||||
|
||||
When using ANSI encoding, you can only use characters from the country or region where your operating system is located. ANSI encoding is supported from Powershell 7.4 onwards, and you will also need to [upgrade your Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4).
|
||||
|
||||
Generate multi-language licenses in ANSI encoding.
|
||||
|
||||
```shell
|
||||
winrar-keygen.exe "简体中文" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "繁體中文" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "Deutsch" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "Français" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "日本語" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "한국어" "license" | Out-File -Encoding ansi rarreg.key
|
||||
```
|
||||
|
||||
When generating utf-8 licenses, you may need to check Use ***[Beta:Use Unicode UTF-8 for global language support](https://stackoverflow.com/a/57134096/10242225)*** in **Control Panel > Clock and Regions > Regions > Administration > Change System Region Settings** in order to process the data correctly. However, it is not recommended that you do this, which may cause many software to not work properly, and it is recommended to [use Github Actions](#4-Use-Github-Actions).
|
||||
|
||||
Generate multi-language licenses with UTF-8 encoding.
|
||||
For example, generating a license with UTF8NoBOM encoding.
|
||||
|
||||
> [!NOTE]
|
||||
> `utf8:` is to ensure constant character representation in WinRAR across languages.
|
||||
|
||||
```shell
|
||||
winrar-keygen.exe "utf8:简体中文" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:简体中文" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:繁體中文" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:Français" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:Deutsch" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:日本語" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:Français" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:日本語" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:한국어" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:한국어" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
@ -339,16 +314,16 @@ If you use the following command:
|
|||
winrar-keygen.exe "Github" "Single PC usage license" > rarreg.key
|
||||
```
|
||||
|
||||
In the newer Windows 10, PowerShell will export in **UTF16-LE** format by default, which will cause the error.
|
||||
In the newer Windows 10 / 11, PowerShell will export in **UTF16-LE** format by default, which will cause the error.
|
||||
|
||||
Please use the following command:
|
||||
|
||||
```shell
|
||||
winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ascii rarreg.key
|
||||
winrar-keygen.exe "Github" "license" | Out-File -Encoding ascii rarreg.key
|
||||
|
||||
winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ansi rarreg.key
|
||||
winrar-keygen.exe "Github" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:Github" "Github.com" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:Github" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
```
|
||||
|
||||
## 8. Contributing
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ WinRAR 不是免费软件。如果你想使用它,你应当向 [__RARLAB__](ht
|
|||
|
||||
### 3.1 编码说明
|
||||
|
||||
WinRAR Keygen 支持 `ASCII`、`ANSI` 和 `UTF-8` 三种编码类型,对应支持的字符如下表:
|
||||
WinRAR Keygen 支持 `ASCII`、`ANSI` 和 `UTF8NoBOM` 三种编码类型,对应支持的字符如下表:
|
||||
|
||||
> [!NOTE]
|
||||
> 默认使用 `utf8`,但是你也可以指定编码为 `ascii` 或 `ansi`。
|
||||
|
|
@ -48,7 +48,7 @@ WinRAR Keygen 支持 `ASCII`、`ANSI` 和 `UTF-8` 三种编码类型,对应支
|
|||
| -------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
|
||||
| [ascii](https://en.wikipedia.org/wiki/ASCII) | 仅支持 ASCII 编码字符 | <img width="300px" src="assets/ascii-characters-light.svg#gh-light-mode-only"><img width="300px" src="assets/ascii-characters-dark.svg#gh-dark-mode-only"> |
|
||||
| ansi | 没有一种固定的 ANSI 编码,通常是 [Windows-1252](http://en.wikipedia.org/wiki/Windows-1252),但也可以是其他本地 | <img width="300px" src="assets/windows-1252-characters-light.svg#gh-light-mode-only"><img width="300px" src="assets/windows-1252-characters-dark.svg#gh-dark-mode-only"> |
|
||||
| [utf8](https://en.wikipedia.org/wiki/UTF-8) | 支持 UTF-8 编码字符 | ASCII characters, English, 简体中文, 繁體中文, Deutsch, Français, Русский, Italiano, 日本語, 한국어, Lengua española, Ελληνική γλώσσα 等。 |
|
||||
| [utf8](https://en.wikipedia.org/wiki/UTF-8) | 支持无 BOM 的 UTF-8 | ASCII characters, English, 简体中文, 繁體中文, Deutsch, Français, Русский, Italiano, 日本語, 한국어, Lengua española, Ελληνική γλώσσα 等。 |
|
||||
|
||||
### 3.2 License 类型
|
||||
|
||||
|
|
@ -215,6 +215,7 @@ C:\Users\yourname\AppData\Roaming\WinRAR\rarreg.key
|
|||
```shell
|
||||
$ vcpkg install mpir:x86-windows-static
|
||||
$ vcpkg install mpir:x64-windows-static
|
||||
$ vcpkg install gmp:x64-windows
|
||||
```
|
||||
|
||||
3. 你的 `vcpkg` 与 __Visual Studio__ 整合了,即你曾成功运行了下面这条命令:
|
||||
|
|
@ -235,7 +236,7 @@ C:\Users\yourname\AppData\Roaming\WinRAR\rarreg.key
|
|||
|
||||
直接在终端执行以下代码,配置两个参数即可生成 `rarreg.key`。
|
||||
|
||||
这里以 `Github` 和 `Single PC usage license` 用 ASCII 编码为例:
|
||||
这里以 `Github` 和 `Single PC usage license` 参数和 ASCII 编码为例:
|
||||
|
||||
```shell
|
||||
Usage:
|
||||
|
|
@ -244,9 +245,6 @@ Usage:
|
|||
Example:
|
||||
|
||||
winrar-keygen.exe "Github" "Single PC usage license"
|
||||
|
||||
or:
|
||||
winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ASCII rarreg.key
|
||||
```
|
||||
|
||||

|
||||
|
|
@ -267,46 +265,25 @@ dd4ab952600ba16a99236d910bfa995d5f60651ec451f462511507
|
|||
5eede7ed46566b10bf033daa6384062b259194b1acbd0378116064
|
||||
```
|
||||
|
||||
将生成的信息以 **ANSI 编码** 的文本格式保存为 `rarreg.key`。
|
||||
将生成的信息以 **ASCII 编码** 的文本格式保存为 `rarreg.key`。
|
||||
|
||||
### 6.4 多语言的支持
|
||||
### 6.4 支持更多字符
|
||||
|
||||
使用 ANSI 编码时,你只能使用你操作系统所在国家或地区的字符。ANSI 编码从 Powershell 7.4 以后开始支持,你还需要[升级你的 Powershell](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4)。
|
||||
除了使用 ASCII 编码,你还可以使用 ANSI 和 UTF8NoBOM 以支持更多字符,但你需要[安装 PowerShell 7.4 及其后续版本](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.4)。
|
||||
|
||||
用 ANSI 编码生成多语言的 license:
|
||||
|
||||
```shell
|
||||
winrar-keygen.exe "简体中文" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "繁體中文" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "Deutsch" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "Français" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "日本語" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "한국어" "license" | Out-File -Encoding ansi rarreg.key
|
||||
```
|
||||
|
||||
使用 UTF-8 编码生成多语言的 license 时,你可能需要在 “控制面板 > 时钟和区域 > 区域 > 管理 > 更改系统区域设置” 中勾选使用 “[Beta版:使用Unicode UTF-8提供全球语言支持](https://stackoverflow.com/a/57134096/10242225)” 才能正确的处理数据。但是不建议你这么操作,这可能会导致很多软件无法正常运行,建议[使用 Github Actions](#4-使用-Github-Actions)。
|
||||
|
||||
用 UTF-8 编码生成多语言的 license:
|
||||
例如,用 UTF8NoBOM 编码生成 license:
|
||||
|
||||
> [!NOTE]
|
||||
> `utf8:` 是为了保证在不同语言的 WinRAR 中做到不变的字符表示。
|
||||
|
||||
```shell
|
||||
winrar-keygen.exe "utf8:简体中文" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:简体中文" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:繁體中文" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:Français" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:Deutsch" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:日本語" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:Français" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:日本語" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:한국어" "license" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:한국어" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
```
|
||||
|
||||
</details>
|
||||
|
|
@ -333,16 +310,16 @@ winrar-keygen.exe <TEXT1> <TEXT2>
|
|||
winrar-keygen.exe "Github" "Single PC usage license" > rarreg.key
|
||||
```
|
||||
|
||||
在较新的 Windows 10 系统中,PowerShell 将默认以 **UTF16-LE** 格式导出,这将会导致错误。
|
||||
在较新的 Windows 10 / 11 系统中,PowerShell 将默认以 **UTF16-LE** 格式导出,这将会导致错误。
|
||||
|
||||
请指定输出编码格式,例如:
|
||||
|
||||
```shell
|
||||
winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ascii rarreg.key
|
||||
winrar-keygen.exe "Github" "license" | Out-File -Encoding ascii rarreg.key
|
||||
|
||||
winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ansi rarreg.key
|
||||
winrar-keygen.exe "Github" "license" | Out-File -Encoding ansi rarreg.key
|
||||
|
||||
winrar-keygen.exe "utf8:Github" "Github.com" | Out-File -Encoding utf8 rarreg.key
|
||||
winrar-keygen.exe "utf8:Github" "license" | Out-File -Encoding UTF8NoBOM rarreg.key
|
||||
```
|
||||
|
||||
### 7.3 关于简体中文版
|
||||
|
|
|
|||
Loading…
Reference in a new issue