Merge pull request #8072 from maxim-belkin/utf8-fix
brew.sh: fixes for UTF-8
This commit is contained in:
		
						commit
						06f078fad2
					
				@ -12,7 +12,16 @@ then
 | 
			
		||||
  then
 | 
			
		||||
    export LC_ALL="en_US.UTF-8"
 | 
			
		||||
  else
 | 
			
		||||
    export LC_ALL="C.UTF-8"
 | 
			
		||||
    locales=$(locale -a)
 | 
			
		||||
    c_utf_regex='\bC\.(utf8|UTF-8)\b'
 | 
			
		||||
    en_us_regex='\ben_US\.(utf8|UTF-8)\b'
 | 
			
		||||
    utf_regex='\b[a-z][a-z]_[A-Z][A-Z]\.(utf8|UTF-8)\b'
 | 
			
		||||
    if [[ $locales =~ $c_utf_regex || $locales =~ $en_us_regex || $locales =~ $utf_regex ]]
 | 
			
		||||
    then
 | 
			
		||||
      export LC_ALL=${BASH_REMATCH[0]}
 | 
			
		||||
    else
 | 
			
		||||
      export LC_ALL=C
 | 
			
		||||
    fi
 | 
			
		||||
  fi
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user