Do not warn about non-utf8 locales on Windows.

pull/1183/head
Jussi Pakkanen 8 years ago
parent 4c74b47cfd
commit 4ef495c596
  1. 4
      meson.py

@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
from mesonbuild import mlog, mesonmain from mesonbuild import mlog, mesonmain, mesonlib
import sys, os, locale import sys, os, locale
def main(): def main():
@ -23,7 +23,7 @@ def main():
# There is no way to reset both the preferred encoding and the filesystem # There is no way to reset both the preferred encoding and the filesystem
# encoding, so we can just warn about it. # encoding, so we can just warn about it.
e = locale.getpreferredencoding() e = locale.getpreferredencoding()
if e.upper() != 'UTF-8': if e.upper() != 'UTF-8' and not mesonlib.is_windows():
mlog.warning('You are using {!r} which is not a a Unicode-compatible ' mlog.warning('You are using {!r} which is not a a Unicode-compatible '
'locale.'.format(e)) 'locale.'.format(e))
mlog.warning('You might see errors if you use UTF-8 strings as ' mlog.warning('You might see errors if you use UTF-8 strings as '

Loading…
Cancel
Save