Why does modern Perl avoid UTF-8 by default?

前端 未结 7 1628
臣服心动
臣服心动 2020-11-21 23:07

I wonder why most modern solutions built using Perl don\'t enable UTF-8 by default.

I understand there are many legacy problems for core Perl scripts, where it may b

7条回答
  •  面向向阳花
    2020-11-21 23:44

    While reading this thread, I often get the impression that people are using "UTF-8" as a synonym to "Unicode". Please make a distinction between Unicode's "Code-Points" which are an enlarged relative of the ASCII code and Unicode's various "encodings". And there are a few of them, of which UTF-8, UTF-16 and UTF-32 are the current ones and a few more are obsolete.

    Please, UTF-8 (as well as all other encodings) exists and have meaning in input or in output only. Internally, since Perl 5.8.1, all strings are kept as Unicode "Code-points". True, you have to enable some features as admiringly covered previously.

提交回复
热议问题