cournape/Bento — Issue #79: error while configuring with german locale
Author: pilotpirx
Created: 2012-01-03 22:53:39+00:00
State: open

I am using Ubuntu 11.10, bento 0.0.7 with the german locale

```
LANG=de_DE.UTF-8
```

While configuring a bento project building an extension module the following error occurred:

```
~/workspace/pyclipper>./bentomaker configure
Looking for gcc (c compiler) ... yes
Checking whether gcc can build objects... yes
Checking whether gcc can build programs... yes
Checking whether gcc can build static libraries... yes
Checking whether gcc can link static libraries to exe... yes
Checking whether gcc can build shared libraries... yes
Checking whether gcc can link shared libraries to exe... yes
Detecting distutils CC exec ... cc
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bentomakerlib/bentomaker.py", line 477, in noexc_main
ret = main(argv)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bentomakerlib/bentomaker.py", line 235, in main
return _wrapped_main(popts, run_node, top_node, build_node)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bentomakerlib/bentomaker.py", line 275, in _wrapped_main
return _main(popts, run_node, top_node, build_node)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bentomakerlib/bentomaker.py", line 347, in _main
run_cmd(cmd_name, cmd_opts, run_node, top_node, build_node)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bentomakerlib/bentomaker.py", line 419, in run_cmd
run_cmd_in_context(cmd_klass, cmd_name, cmd_opts, ctx_klass, run_node, top_node, pkg)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bentomakerlib/bentomaker.py", line 456, in run_cmd_in_context
cmd_func(ctx)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/commands/configure.py", line 242, in run
ctx.setup()
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/commands/yaku_contexts.py", line 37, in setup
yaku_ctx.use_tools([t])
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/private/_yaku/yaku/context.py", line 100, in use_tools
self.setup_tools()
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/private/_yaku/yaku/context.py", line 106, in setup_tools
builder.configure()
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/private/_yaku/yaku/tools/pyext.py", line 299, in configure
yaku_cc_type = detect_cc_type(ctx, cc_exec)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/private/_yaku/yaku/tools/pyext.py", line 367, in detect_cc_type
return _detect_cc_type(ctx, cc_cmd)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/private/_yaku/yaku/tools/pyext.py", line 398, in _detect_cc_type
cc_type = detect_type(v)
File "/home/adr/workspace/pyclipper/.bentomaker-0.1-d3f71836cdd7385d6da9b9fc62e9c4b8/bento/private/_yaku/yaku/tools/pyext.py", line 383, in detect_type
out = p.communicate()[0].decode()
bentomaker: Error: bentomaker crashed (uncaught exception : 'ascii' codec can't decode byte 0xc2 in position 34: ordinal not in range(128)).
Please report this on bento issue tracker:
http://github.com/cournape/bento/issues
Detecting CC type...
```

If I change the local to an English one the error disappears.

As far as I can tell, it calls

```
$cc -V
cc: Fehler: nicht erkannte Option »-V«
cc: schwerwiegender Fehler: keine Eingabedateien
Kompilierung beendet.
```

and can't decode the '»'