git: cldr2def: Modify tool to create a "common" UTF-8 locale

John Marino marino at crater.dragonflybsd.org
Wed Aug 12 17:11:10 PDT 2015


commit f223f854e82cd377092965525b370baf37a1405c
Author: John Marino <draco at marino.st>
Date:   Thu Aug 13 01:54:31 2015 +0200

    cldr2def: Modify tool to create a "common" UTF-8 locale
    
    With the switch to CLDR definitions, each locale has specific encoding.
    E.g. en_US, fr_FR has latin characters, el_GR has Greek characters,
    etc.  Seeing a filename written in Chinese characters while in en_US.UTF-8
    will result in a bunch of "???" because the characters are illegal for
    the locale's CTYPE definition.
    
    Previously there was one shared CTYPE for all locales.  This was handy
    but incorrect.  It was also not updated and became slightly bitrotted.
    
    I am going to create a "fake" locale called "common.UTF-8".  It is the
    same as en_US.UTF-8, but with an LC_CTYPE that is practically universal
    in that all common character sets (and symbols) are defined.  To use it,
    one can do either:
      1) Set LANG env. variable to "common.UTF-8"
      2) Set LC_CTYPE env. variable to "common.UTF-8"
    
    e.g. "env LANG=fr_FR.UTF-8 LC_CTYPE=common.UTF-8 ls"
    
    This commit only updates the tool.  The locale comes later.
    In addition to making changes that support the "common" base, the tool
    was also tweaked to favor en_US.UTF-8 as the "LOCALES+=" value.  This
    should reduce a lot of the renaming churn we've been seeing on new
    generations.

Summary of changes:
 tools/tools/locale/Makefile                |    1 +
 tools/tools/locale/etc/charmaps.xml        |    2 +-
 tools/tools/locale/etc/en_COMMON.UTF-8.src | 7250 ++++++++++++++++++++++++++++
 tools/tools/locale/tools/cldr2def.pl       |   14 +-
 4 files changed, 7265 insertions(+), 2 deletions(-)
 create mode 100644 tools/tools/locale/etc/en_COMMON.UTF-8.src

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f223f854e82cd377092965525b370baf37a1405c


-- 
DragonFly BSD source repository


More information about the Commits mailing list