home *** CD-ROM | disk | FTP | other *** search
/ tusportal.tus.k12.pa.us / tusportal.tus.k12.pa.us.tar / tusportal.tus.k12.pa.us / Wyse / latest-image.raw / 0.img / etc / profile.d / zzz-glib2.sh < prev    next >
Text File  |  2010-05-09  |  12KB  |  466 lines

  1. # GLib filename encoding guesser.
  2. # Author: Stanislav Brabec <sbrabec@suse.cz>
  3. # Additions are welcome.
  4. # This script must be executed after setting LANG variable.
  5.  
  6. # Try filenames which are invalid in UTF-8 as locale specific.
  7. # For selected locales, G_FILENAME_ENCODING takes precedence.
  8. export G_BROKEN_FILENAMES=1
  9.  
  10. # In West Europe there was used both ISO-8859-15 and ISO-8859-1.
  11. #┬áThere is no chance to recognize it, so we must guess.
  12. #west_europe_legacy_encoding=ISO-8859-1
  13. west_europe_legacy_encoding=ISO-8859-15
  14.  
  15. # In Russia, "official" encoding is ISO-8859-5, but most GNOME users
  16. # preferred KOI8-R. We must guess.
  17. #russian_legacy_encoding=ISO-8859-5
  18. russian_legacy_encoding=KOI8-R
  19.  
  20. # In former Yugoslavia sr_YU have covered two different alphabets -
  21. # one Latin and on Cyrillic. No chance to guess.
  22. sr_YU_legacy_encoding=ISO-8859-2,CP1250
  23. #sr_YU_legacy_encoding=ISO-8859-5
  24.  
  25. # Japanese uses two legacy encodings. Guess sometimes fails, sometimes not.
  26. # Defining preferred encoding increases chance for success.
  27. japanese_legacy_encoding=EUC-JP
  28. #japanese_legacy_encoding=SHIFT_JIS
  29.  
  30. case $LANG in
  31.     aa_DJ* )
  32.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  33.     ;;
  34.     af_ZA* )
  35.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  36.     ;;
  37.     an_ES* )
  38.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
  39.     ;;
  40.     ar_AE* )
  41.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  42.     ;;
  43.     ar_BH* )
  44.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  45.     ;;
  46.     ar_DZ* )
  47.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  48.     ;;
  49.     ar_EG* )
  50.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  51.     ;;
  52.     ar_IQ* )
  53.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  54.     ;;
  55.     ar_JO* )
  56.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  57.     ;;
  58.     ar_KW* )
  59.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  60.     ;;
  61.     ar_LB* )
  62.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  63.     ;;
  64.     ar_LY* )
  65.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  66.     ;;
  67.     ar_MA* )
  68.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  69.     ;;
  70.     ar_OM* )
  71.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  72.     ;;
  73.     ar_QA* )
  74.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  75.     ;;
  76.     ar_SA* )
  77.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  78.     ;;
  79.     ar_SD* )
  80.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  81.     ;;
  82.     ar_SY* )
  83.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  84.     ;;
  85.     ar_TN* )
  86.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  87.     ;;
  88.     ar_YE* )
  89.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-6
  90.     ;;
  91.     be_BY* )
  92.     G_FILENAME_ENCODING=@locale,UTF-8,CP1251
  93.     ;;
  94.     bg_BG* )
  95.     G_FILENAME_ENCODING=@locale,UTF-8,CP1251
  96.     ;;
  97.     br_FR* )
  98.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  99.     ;;
  100.     bs_BA* )
  101.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  102.     ;;
  103.     ca_ES* )
  104.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  105.     ;;
  106.     cs_CZ* )
  107.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  108.     ;;
  109.     cy_GB* )
  110.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-14,CP1252
  111.     ;;
  112.     da_DK* )
  113.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  114.     ;;
  115.     de_AT* )
  116.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  117.     ;;
  118.     de_BE* )
  119.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  120.     ;;
  121.     de_DE* )
  122.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  123.     ;;
  124.     de_CH* )
  125.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  126.     ;;
  127.     de_LU* )
  128.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  129.     ;;
  130.     el_GR* )
  131.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-7
  132.     ;;
  133.     en_AU* )
  134.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  135.     ;;
  136.     en_BE* )
  137.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  138.     ;;
  139.     en_BW* )
  140.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  141.     ;;
  142.     en_CA* )
  143.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  144.     ;;
  145.     en_DK* )
  146.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  147.     ;;
  148.     en_GB* )
  149.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  150.     ;;
  151.     en_HK* )
  152.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  153.     ;;
  154.     en_IE* )
  155.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  156.     ;;
  157.     en_NZ* )
  158.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  159.     ;;
  160.     en_PH* )
  161.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  162.     ;;
  163.     en_SG* )
  164.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  165.     ;;
  166.     en_US* )
  167.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  168.     ;;
  169.     en_ZA* )
  170.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  171.     ;;
  172.     en_ZW* )
  173.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  174.     ;;
  175.     es_AR* )
  176.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  177.     ;;
  178.     es_BO* )
  179.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  180.     ;;
  181.     es_CL* )
  182.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  183.     ;;
  184.     es_CO* )
  185.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  186.     ;;
  187.     es_CR* )
  188.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  189.     ;;
  190.     es_DO* )
  191.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  192.     ;;
  193.     es_EC* )
  194.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  195.     ;;
  196.     es_ES* )
  197.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  198.     ;;
  199.     es_GT* )
  200.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  201.     ;;
  202.     es_HN* )
  203.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  204.     ;;
  205.     es_MX* )
  206.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  207.     ;;
  208.     es_NI* )
  209.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  210.     ;;
  211.     es_PA* )
  212.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  213.     ;;
  214.     es_PE* )
  215.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  216.     ;;
  217.     es_PR* )
  218.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  219.     ;;
  220.     es_PY* )
  221.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  222.     ;;
  223.     es_SV* )
  224.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  225.     ;;
  226.     es_US* )
  227.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  228.     ;;
  229.     es_UY* )
  230.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  231.     ;;
  232.     es_VE* )
  233.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  234.     ;;
  235.     et_EE* )
  236.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  237.     ;;
  238.     eu_ES* )
  239.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  240.     ;;
  241.     fa_IR* )
  242.     G_FILENAME_ENCODING=@locale,UTF-8,CP1256
  243.     ;;
  244.     fi_FI* )
  245.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  246.     ;;
  247.     fo_FO* )
  248.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  249.     ;;
  250.     fr_BE* )
  251.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  252.     ;;
  253.     fr_CA* )
  254.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  255.     ;;
  256.     fr_FR* )
  257.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  258.     ;;
  259.     fr_CH* )
  260.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  261.     ;;
  262.     fr_LU* )
  263.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  264.     ;;
  265.     ga_IE* )
  266.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  267.     ;;
  268.     gd_GB* )
  269.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
  270.     ;;
  271.     gl_ES* )
  272.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  273.     ;;
  274.     gv_GB* )
  275.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  276.     ;;
  277.     he_IL* )
  278.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-8
  279.     ;;
  280.     hr_HR* )
  281.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  282.     ;;
  283.     hu_HU* )
  284.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  285.     ;;
  286.     hy_AM* )
  287.     G_FILENAME_ENCODING=@locale,UTF-8,ARMSCII-8
  288.     ;;
  289.     id_ID* )
  290.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  291.     ;;
  292.     is_IS* )
  293.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  294.     ;;
  295.     it_CH* )
  296.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  297.     ;;
  298.     it_IT* )
  299.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  300.     ;;
  301.     iw_IL* )
  302.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-8
  303.     ;;
  304.     ja_JP* )
  305.     G_FILENAME_ENCODING=@locale,UTF-8,$japanese_legacy_encoding,EUC-JP,SHIFT_JIS,ISO-8859-1
  306.     ;;
  307.     ka_GE* )
  308.     G_FILENAME_ENCODING=@locale,UTF-8,GEORGIAN-PS
  309.     ;;
  310.     kl_GL* )
  311.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  312.     ;;
  313.     km_KH* )
  314.     G_FILENAME_ENCODING=@locale,UTF-8,GB18030
  315.     ;;
  316.     ko_KR* )
  317.     G_FILENAME_ENCODING=@locale,UTF-8,EUC-KR,ISO-8859-1
  318.     ;;
  319.     kw_GB* )
  320.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  321.     ;;
  322.     lg_UG* )
  323.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-10,CP1252
  324.     ;;                                          
  325.     lt_LT* )                                        
  326.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-13,CP1252
  327.     ;;                                          
  328.     lv_LV* )                                        
  329.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-13,CP1252
  330.     ;;                                          
  331.     mi_NZ* )                                        
  332.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-13,CP1252
  333.     ;;
  334.     mk_MK* )
  335.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-5,CP1251
  336.     ;;
  337.     ms_MY* )
  338.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  339.     ;;
  340.     mt_MT* )
  341.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-3
  342.     ;;
  343.     nb_NO* )
  344.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  345.     ;;
  346.     nl_BE* )
  347.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  348.     ;;
  349.     nl_NL* )
  350.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  351.     ;;
  352.     nn_NO* )
  353.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  354.     ;;
  355.     no_NO* )
  356.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  357.     ;;
  358.     oc_FR* )
  359.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  360.     ;;
  361.     om_KE* )
  362.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  363.     ;;
  364.     pl_PL* )
  365.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  366.     ;;
  367.     pt_BR* )
  368.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  369.     ;;
  370.     pt_PT* )
  371.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  372.     ;;
  373.     ro_RO* )
  374.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  375.     ;;
  376.     ru_RU* )
  377.     G_FILENAME_ENCODING=@locale,UTF-8,$russian_legacy_encoding,CP1251
  378.     ;;
  379.     ru_UA* )
  380.     G_FILENAME_ENCODING=@locale,UTF-8,KOI8-U
  381.     ;;
  382.     sh_YU* )
  383.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  384.     ;;
  385.     sk_SK* )
  386.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  387.     ;;
  388.     sl_SI* )
  389.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-2,CP1250
  390.     ;;
  391.     so_DJ* )
  392.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  393.     ;;
  394.     so_KE* )
  395.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  396.     ;;
  397.     so_SO* )
  398.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  399.     ;;
  400.     sq_AL* )
  401.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  402.     ;;
  403.     sr_YU* )
  404.     G_FILENAME_ENCODING=@locale,UTF-8,$sr_YU_legacy_encoding
  405.     ;;
  406.     st_ZA* )
  407.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  408.     ;;
  409.     sv_FI* )
  410.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  411.     ;;
  412.     sv_SE* )
  413.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  414.     ;;
  415.     tg_TJ* )
  416.     G_FILENAME_ENCODING=@locale,UTF-8,KOI8-T
  417.     ;;
  418.     th_TH* )
  419.     G_FILENAME_ENCODING=@locale,UTF-8,TIS-620,ISO-8859-1
  420.     ;;
  421.     tl_PH* )
  422.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  423.     ;;
  424.     tr_TR* )
  425.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-9
  426.     ;;
  427.     uk_UA* )
  428.     G_FILENAME_ENCODING=@locale,UTF-8,KOI8-U
  429.     ;;
  430.     uz_UZ* )
  431.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  432.     ;;
  433.     vi_VN* )
  434.     G_FILENAME_ENCODING=@locale,UTF-8,TCVN5712-1,ISO-8859-1
  435.     ;;
  436.     wa_BE* )
  437.     G_FILENAME_ENCODING=@locale,UTF-8,$west_europe_legacy_encoding,CP1252
  438.     ;;
  439.     xh_ZA* )
  440.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  441.     ;;
  442.     yi_US* )
  443.     G_FILENAME_ENCODING=@locale,UTF-8,CP1255
  444.     ;;
  445.     zh_CN* )
  446.     G_FILENAME_ENCODING=@locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1
  447.     ;;
  448.     zh_HK* )
  449.     G_FILENAME_ENCODING=@locale,UTF-8,BIG5-HKSCS,ISO-8859-1
  450.     ;;
  451.     zh_SG* )
  452.     G_FILENAME_ENCODING=@locale,UTF-8,GB2312,GB18030,GBK,ISO-8859-1
  453.     ;;
  454.     zh_TW* )
  455.     G_FILENAME_ENCODING=@locale,UTF-8,BIG5,EUC-TW,ISO-8859-1
  456.     ;;
  457.     zu_ZA* )
  458.     G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-1,CP1252
  459.     ;;
  460. esac
  461. export G_FILENAME_ENCODING
  462.  
  463. unset west_europe_legacy_encoding
  464. unset russian_legacy_encoding
  465. unset sr_YU_legacy_encoding
  466.