Skip to content

Commit ef371d6

Browse files
committed
deploy: 9049320
1 parent cd07b5c commit ef371d6

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ <h2 id="_1">前言</h2>
292292
<blockquote>
293293
<p><img src="./img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
294294
</blockquote>
295-
<p>更新时间:2024年11月26日 12:26:35 (UTC+08:00)</p>
295+
<p>更新时间:2024年11月26日 12:32:42 (UTC+08:00)</p>
296296
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
297297
<h2 id="_2">格式约定</h2>
298298
<blockquote>

print_page/index.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ <h2 id="index-_1">前言</h2>
421421
<blockquote>
422422
<p><img src="../img/bulb.png" height="30px" width="auto" style="margin: 0; border: none"/> 本书还在持续更新中……要追番的话,可以在 <a href="https://github.com/parallel101/cppguidebook">GitHub</a> 点一下右上角的 “Watch” 按钮,每当小彭老师提交新 commit,GitHub 会向你发送一封电子邮件,提醒你小彭老师更新了。</p>
423423
</blockquote>
424-
<p>更新时间:2024年11月26日 12:26:35 (UTC+08:00)</p>
424+
<p>更新时间:2024年11月26日 12:32:42 (UTC+08:00)</p>
425425
<p><a href="https://parallel101.github.io/cppguidebook">在 GitHub Pages 浏览本书</a> | <a href="https://142857.red/book">在小彭老师自己维护的镜像上浏览本书</a></p>
426426
<h2 id="index-_2">格式约定</h2>
427427
<blockquote>
@@ -18357,11 +18357,13 @@ <h3 id="unicode-utf-8_4">UTF-8 派的跨平台软件何去何从?</h3>
1835718357
setlocale(LC_ALL, &quot;.utf-8&quot;); // 设置标准库调用系统 API 所用的编码,用于 fopen,ifstream 等函数
1835818358
SetConsoleOutputCP(CP_UTF8); // 设置控制台输出编码,或者写 system(&quot;chcp 65001&quot;) 也行,这里 CP_UTF8 = 65001
1835918359
SetConsoleCP(CP_UTF8); // 设置控制台输入编码,用于 std::cin
18360+
#elif __APPLE__
18361+
// 通常来说 MacOS 的默认编码就是 UTF-8,这里设置全局 locale 是为了让 iswspace 接受全角空格、iswpunct 接受全角逗号 L',' 等
18362+
setlocale(LC_ALL, &quot;UTF-8&quot;); // MacOS 设置 UTF-8 编码,让 iswspace 接受全角空格等
1836018363
#elif __unix__
1836118364
// 反正 Unix 系统默认都是 UTF-8,不设置也行,这里设置全局 locale 是为了让 iswspace 接受全角空格、iswpunct 接受全角逗号 L',' 等
1836218365
//setlocale(LC_ALL, &quot;zh_CN.utf-8&quot;); // 设置使用中文本地化,可使 strerror 输出中文(但用户必须 locale-gen 过中文!)
18363-
//setlocale(LC_ALL, &quot;C.utf-8&quot;); // 设置使用语言中性 locale,只影响 iswspace、iswpunct 等函数,不会使 strerror 等输出中文
18364-
setlocale(LC_ALL, &quot;.utf-8&quot;); // 若不带任何前缀(推荐),则默认使用当前系统环境变量中的语言 $LANG,使 strerror 自动适应
18366+
setlocale(LC_ALL, &quot;C.utf-8&quot;); // 设置使用语言中性 locale(推荐),只影响 iswspace、iswpunct 等函数,不会使 strerror 等输出中文
1836518367
#endif
1836618368
// 这里开始写你的主程序吧!
1836718369
// ...

search/search_index.json

+1-1
Large diffs are not rendered by default.

unicode/index.html

+4-2
Original file line numberDiff line numberDiff line change
@@ -3066,11 +3066,13 @@ <h3 id="utf-8_4">UTF-8 派的跨平台软件何去何从?</h3>
30663066
setlocale(LC_ALL, &quot;.utf-8&quot;); // 设置标准库调用系统 API 所用的编码,用于 fopen,ifstream 等函数
30673067
SetConsoleOutputCP(CP_UTF8); // 设置控制台输出编码,或者写 system(&quot;chcp 65001&quot;) 也行,这里 CP_UTF8 = 65001
30683068
SetConsoleCP(CP_UTF8); // 设置控制台输入编码,用于 std::cin
3069+
#elif __APPLE__
3070+
// 通常来说 MacOS 的默认编码就是 UTF-8,这里设置全局 locale 是为了让 iswspace 接受全角空格、iswpunct 接受全角逗号 L',' 等
3071+
setlocale(LC_ALL, &quot;UTF-8&quot;); // MacOS 设置 UTF-8 编码,让 iswspace 接受全角空格等
30693072
#elif __unix__
30703073
// 反正 Unix 系统默认都是 UTF-8,不设置也行,这里设置全局 locale 是为了让 iswspace 接受全角空格、iswpunct 接受全角逗号 L',' 等
30713074
//setlocale(LC_ALL, &quot;zh_CN.utf-8&quot;); // 设置使用中文本地化,可使 strerror 输出中文(但用户必须 locale-gen 过中文!)
3072-
//setlocale(LC_ALL, &quot;C.utf-8&quot;); // 设置使用语言中性 locale,只影响 iswspace、iswpunct 等函数,不会使 strerror 等输出中文
3073-
setlocale(LC_ALL, &quot;.utf-8&quot;); // 若不带任何前缀(推荐),则默认使用当前系统环境变量中的语言 $LANG,使 strerror 自动适应
3075+
setlocale(LC_ALL, &quot;C.utf-8&quot;); // 设置使用语言中性 locale(推荐),只影响 iswspace、iswpunct 等函数,不会使 strerror 等输出中文
30743076
#endif
30753077
// 这里开始写你的主程序吧!
30763078
// ...

0 commit comments

Comments
 (0)