Windows上的本机窄字符串编码是什么? [英] What is the native narrow string encoding on Windows?

查看:109
本文介绍了Windows上的本机窄字符串编码是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Subversion API具有功能数量,用于从本机编码字符串转换为以UTF-8编码的字符串。我的问题是:Windows上的本机编码是什么?

The Subversion API has a number of functions for converting from "natively-encoded" strings to strings that are encoded in UTF-8. My question is: what is this native encoding on Windows? Does it depend on locale?

推荐答案

本地编码字符串是用任何用户正在使用的代码页。也就是说,它们是根据正确的代码页转换为适当字形的数字。假定文件是用这种方式保存的,而不是保存为UTF-8文件。

"Natively encoded" strings are strings written in whatever code page the user is using. That is, they are numbers that are translated to the appropriate glyphs based on the correct code page. Assuming the file was saved that way and not as a UTF-8 file.

这是乔尔关于Unicode的文章

具体是:


最终,这个OEM供所有人免费获得了以ANSI标准编码的
。在
ANSI标准中,每个人都同意
在128以下做什么,这与$ ASCII差不多,但与$ ASCII相同,但是
有很多不同的处理方式b $ b个字符(从128开始),取决于您的居住地。这些
个不同的系统称为代码
页。例如,在以色列DOS中,
使用了称为862的代码页,而
希腊用户使用了737。他们是
低于128,但不同于128
,其中所有有趣的字母
居住着。
MS-DOS的国家版本有数十个这样的代码页,
处理从英语到
冰岛语的所有内容,甚至有几个
个多语言代码页可以b $ b在同一台
计算机上做世界语和加利西亚语!哇!但是,如果说
希伯来语和希腊语在同一台计算机
上是完全不可能的,除非
您编写了自己的自定义程序,即
使用位图
图形来显示所有内容,因为希伯来语和希腊语
需要使用不同的代码页,且
对高
数字有不同的解释。

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.

这篇关于Windows上的本机窄字符串编码是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆