You may want to try this: http://stackoverflow.com/a/18439832/166761

Or chcp 65001 in your current shell first and see if that works for you. Then 
you can generalise it to try and always start your shell using that codepage.

C.


On 26 Jun 2015, at 09:05, [email protected] wrote:

> CP1250 looks like it may be the default codepage for your selected language 
> in windows.
> Try to find out how to set your shell to use UTF-8. It’s been years since I 
> last used windows so I can’t give you an informed example of how to do that.
> 
> Running “set” on your shell will give you a list of your current environment 
> variables, maybe you find one that looks like language or charset. Or maybe 
> on some settings dialog for your terminal program.
> 
> Good luck,
> Carles
> 
> 
> On 26 Jun 2015, at 00:56, [email protected] wrote:
> 
>> Hello all,
>> 
>> I tried to create different language versions of my Django webpages (Django 
>> 1.8 on windows).
>> Inserted {% trans ""%} and {%bocktrans%} into my templates  and called 
>> "python manage.py makemessages -l en"
>> This produced following error:
>> 
>> Exception in thread Thread-37:
>> Traceback (most recent call last):
>>   \Python33\lib\threading.py", line 901, in _bootstrap_inner
>>     self.run()
>>   \Python33\lib\threading.py", line 858, in run
>>     self._target(*self._args, **self._kwargs)
>>   \Python33\lib\subprocess.py", line 1170, in _readerthread
>>     buffer.append(fh.read())
>>   \Python33\lib\encodings\cp1250.py", line 23, in decode
>>     return codecs.charmap_decode(input,self.errors,decoding_table)[0]
>> UnicodeDecodeError: 'charmap' codec can't decode byte 0x88 in position 3339: 
>> character maps to <undefined>
>> 
>> Traceback (most recent call last):
>>   "manage.py", line 10, in <module>
>>     execute_from_command_line(sys.argv)
>>   \Python33\lib\site-packages\django\core\management\__init__.py", line 338, 
>> in execute_from_command_line
>>     utility.execute()
>>   \Python33\lib\site-packages\django\core\management\__init__.py", line 330, 
>> in execute
>>     self.fetch_command(subcommand).run_from_argv(self.argv)
>>   \Python33\lib\site-packages\django\core\management\base.py", line 390, in 
>> run_from_argv
>>     self.execute(*args, **cmd_options)
>>   \Python33\lib\site-packages\django\core\management\base.py", line 441, in 
>> execute
>>     output = self.handle(*args, **options)
>>   
>> \Python33\lib\site-packages\django\core\management\commands\makemessages.py",
>>  line 315, in handle
>>     potfiles = self.build_potfiles()
>>   
>> \Python33\lib\site-packages\django\core\management\commands\makemessages.py",
>>  line 349, in build_potfiles
>>     f.process(self, self.domain)
>>   
>> \Python33\lib\site-packages\django\core\management\commands\makemessages.py",
>>  line 137, in process
>>     msgs, errors, status = gettext_popen_wrapper(args)
>>   
>> \Python33\lib\site-packages\django\core\management\commands\makemessages.py",
>>  line 39, in gettext_popen_wrapper
>>     stdout, stderr, status_code = popen_wrapper(args, 
>> os_err_exc_type=os_err_exc_type)
>>   \Python33\lib\site-packages\django\core\management\utils.py", line 27, in 
>> popen_wrapper
>>     output, errors = p.communicate()
>>   \Python33\lib\subprocess.py", line 921, in communicate
>>     stdout, stderr = self._communicate(input, endtime, timeout)
>>   \Python33\lib\subprocess.py", line 1226, in _communicate
>>     stdout = stdout[0]
>> IndexError: list index out of range
>> 
>> Template files are encoded with UTF-8.
>> I have found some similar problems but nothing that helps with this error. 
>> This is my first experiment with Python and Django so I believe the solution 
>> is simple. The problem seems to me in calling 
>> \Python33\lib\encodings\cp1250.py but I have no Idea how to change it.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django internationalization and localization" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/django-i18n.
>> For more options, visit https://groups.google.com/d/optout.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django internationalization and localization" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-i18n.
For more options, visit https://groups.google.com/d/optout.

Reply via email to