In OS X Lion, LANG is not set to UTF-8, how to fix it?

后端 未结 5 1440
离开以前
离开以前 2020-11-28 17:25

I try to setup postgress in OS X Lion, and find that is not correctly setup the LOCALE environment var.

This is what is set:

LANG=
LC_COLLATE=\"C\"
L         


        
5条回答
  •  清酒与你
    2020-11-28 18:25

    if you have zsh installed you can also update ~/.zprofile with

    if [[ -z "$LC_ALL" ]]; then
      export LC_ALL='en_US.UTF-8'
    fi
    

    and check the output using the locale cmd as show above

    ❯ locale                                                                                                                                           
    LANG="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_CTYPE="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_ALL="en_US.UTF-8"
    

提交回复
热议问题