This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: LANG=ru_RU.cp1251, but binutils use UTF-8.


On 22.06.2010 9:00, Andy Koppe wrote:
On 21 June 2010 09:14, Oleksandr Gavenko wrote:
I globally set LANG=ru_RU.cp1251 for Russian Windows.
All command work as expected (from coreutils, svn, etc.).

But objdump, nm, objcopy use UTF-8 instead recode to cp1251:

  $  objdump --help | head -n 2
ÐÐÐÐÑÐÑÐÂÐÐÐÂÐÑÐÐÐÂÐÐÐÑÐÂ: objdump<ÐÑÐÑÐâÐÑÐÑ>  <ÐâÐÂÐâÐÂ(Ðâ)>
  ÐÑÐâÐÑÐÂÐÐÐÂÐÂÐÂÐÂÐâ ÐÑÐÐÐâÐÑÐÐÐÑÐÂÐâÐÑÐÐ ÐÑРÐÑÐÂÐÐÐÂÐÑÐâÐÂ
<ÐâÐÂÐâÐÂ(Ðâ)>.
  $ LANG=C objdump --help | head -n 2
Usage: objdump<option(s)>  <file(s)>
  Display information from object<file(s)>.

I can't get objdump to emit anything but an English help message, no matter the LANG setting. Are you sure you're using Cygwin's objdump, i.e. what do 'which objdump' and 'objdump --version' say?


bash# uname -a CYGWIN_NT-5.1 gavenko 1.7.1(0.218/5/3) 2009-12-07 11:48 i686 Cygwin

  bash# echo $LANG
ru_RU.CP1251

  bash# which objdump
/usr/bin/objdump

bash# objdump --version
GNU objdump (GNU Binutils) 2.19.51.20090704
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.


bash# objdump.exe -p npmy.dll

npmy.dll: ÐâÐÑÐÐÐÑÐÂÐâ ÐâÐÂÐâÐÂРpei-i386

ÐÒÐÂÐÐÐÂÐÑÐâÐÂÐÐÐÑÐÐÐâÐÑÐÑÐÑ 0x2102
        executable
        32 bit words
        DLL
.... .... ....

I look more carefully on 'objdump' output. It translated partially!
(--version output not translated in general)

My code parse 'objdump -p' output and expect grep some keywords, which translated.
To workaround I use:


$ LC_ALL=C objdump -p my.dll | sed '...'

So there are two issue with binutils:
  * partially translated
  * ignore LANG=ruRU.cp1251 and uses UTF-8


-- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]