gpt4 book ai didi

c++ - Windows 上的 native 窄字符串编码是什么?

转载 作者:可可西里 更新时间:2023-11-01 17:35:55 30 4
gpt4 key购买 nike

Subversion API 有一个 number of functions用于将“本地编码”字符串转换为以 UTF-8 编码的字符串。我的问题是:Windows 上的 native 编码是什么?它取决于语言环境吗?

最佳答案

“ native 编码”字符串是用任何 code page 编写的字符串用户正在使用。也就是说,它们是根据正确的代码页转换为适当字形的数字。假设文件是​​以这种方式保存的,而不是保存为 UTF-8 文件。

这是 Joel's article on Unicode 的候选问题.

具体来说:

Eventually this OEM free-for-all got codified in the ANSI standard. In the ANSI standard, everybody agreed on what to do below 128, which was pretty much the same as ASCII, but there were lots of different ways to handle the characters from 128 and on up, depending on where you lived. These different systems were called code pages. So for example in Israel DOS used a code page called 862, while Greek users used 737. They were the same below 128 but different from 128 up, where all the funny letters resided. The national versions of MS-DOS had dozens of these code pages, handling everything from English to Icelandic and they even had a few "multilingual" code pages that could do Esperanto and Galician on the same computer! Wow! But getting, say, Hebrew and Greek on the same computer was a complete impossibility unless you wrote your own custom program that displayed everything using bitmapped graphics, because Hebrew and Greek required different code pages with different interpretations of the high numbers.

关于c++ - Windows 上的 native 窄字符串编码是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4649388/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com