YouCompleteMe/python/ycm
Homu e0f2da0885 Auto merge of #2160 - micbou:open-file-encoding, r=Valloric
[READY] Fix LookupError exception when opening a file

Fixes #2159.

I think the issue is caused by `locale.getpreferredencoding()` returning an empty string on some configurations (especially on OS X with Python 2). This is [the value used by default when no encoding is specified](https://docs.python.org/2/library/io.html?highlight=open#io.open). The same error is raised if we do:
```python
open( 'some_file', encoding = '' )
```

For references, similar issues: https://github.com/Valloric/ycmd/issues/395, https://github.com/Valloric/ycmd/issues/419

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2160)
<!-- Reviewable:end -->
2016-05-11 02:01:22 +09:00
..
client Add tests for omni completer GetCompletions 2016-05-08 15:47:58 +01:00
tests Auto merge of #2160 - micbou:open-file-encoding, r=Valloric 2016-05-11 02:01:22 +09:00
__init__.py Fixing python tests broken in rename 2013-05-19 20:06:14 -07:00
base.py Avoid evaluating Vim globals in Python 2016-05-06 20:14:10 +02:00
diagnostic_interface.py Update flake8 config 2016-03-06 17:39:55 +00:00
omni_completer.py Add tests for omni completer GetCompletions 2016-05-08 15:47:58 +01:00
paths.py Add error messages when ycmd crashed 2016-05-02 23:08:32 +02:00
setup.py Add error messages when ycmd crashed 2016-05-02 23:08:32 +02:00
syntax_parse.py Fix traceback when a syntax file has unicode characters 2016-03-10 21:28:42 +00:00
test_utils.py Add tests for omni completer GetCompletions 2016-05-08 15:47:58 +01:00
unsafe_thread_pool_executor.py Update flake8 config 2016-03-06 17:39:55 +00:00
vimsupport.py Auto merge of #2160 - micbou:open-file-encoding, r=Valloric 2016-05-11 02:01:22 +09:00
youcompleteme.py Fix a number of multi-byte errors and tracebacks 2016-05-08 15:32:36 +01:00