wanglongqi / pdf2djvu

Automatically exported from code.google.com/p/pdf2djvu
0 stars 2 forks source link

Encoding problems with Russian translation (Windows) #64

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
1. Downloaded the latest windows binaries.
2. Tried to run via PowerShell.
3. The output is

PS C:\Users\1\Desktop\pdf2djvu-0.7.10> .\pdf2djvu.exe
?? гЄ § -R Ё┐п ўеR¤-R?R д c< 

?бЇR<м§Rў -Ё?:
   pdf2djvu [-o <а?§г<мвЁагойЁc-djvu-д c<>] [Ї а ┐?вал] <pdf-д c<>
   pdf2djvu -i <д c<-Ё-¤?Єб -djvu> [Ї а ┐?вал] <pdf-д c<>

? а ┐?вал:
 -i, --indirect="?%<
 -o, --output="?%<
     --pageid-prefix=???
     --pageid-template=???<??
     --page-title-template=???<??
 -d, --dpi=??╪?:?:??:
     --guess-dpi
     --media-box
     --page-size=???x'>'
     --bg-slices=N,...,N
     --bg-slices=N+...+N
     --bg-subsample=N
     --fg-colors=default
     --fg-colors=web
     --fg-colors=black
     --monochrome
     --loss-level=N
     --lossy
     --anti-alias
     --no-metadata
     --verbatim-metadata
     --no-outline
     --hyperlinks=border-avis
     --hyperlinks=#RRGGBB
     --no-hyperlinks
     --no-text
     --words
     --lines
     --crop-text
     --no-nfkc
     --filter-text=?????"???-''????
 -p, --pages=...
 -v, --verbose
 -q, --quiet
 -h, --help
     --version

The standart shell gives the same output.

Original issue reported on code.google.com by revzi...@gmail.com on 10 Jan 2012 at 1:06

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The system is Win7 x64.

Original comment by revzi...@gmail.com on 10 Jan 2012 at 1:10

GoogleCodeExporter commented 9 years ago
This is the screenshot.

Original comment by revzi...@gmail.com on 10 Jan 2012 at 1:11

Attachments:

GoogleCodeExporter commented 9 years ago
What's the output of the "chcp" command?

Original comment by jwilk@jwilk.net on 10 Jan 2012 at 4:25

GoogleCodeExporter commented 9 years ago
The codepage is 866.

Original comment by revzi...@gmail.com on 10 Jan 2012 at 4:44

GoogleCodeExporter commented 9 years ago
That makes no sense to me. :/ As far as I can tell, in Russian locale, pdf2djvu 
does output in CP866.

Anyway, could you paste output of the attached program? Maybe it'll shed some 
light to the problem.

Original comment by jwilk@jwilk.net on 10 Jan 2012 at 5:28

Attachments:

GoogleCodeExporter commented 9 years ago
Sure, here is the output you requested:
C:\Users\1\Desktop>getcpinfo.exe
ACP = 1251
OEMCP = 866
ConsoleOutputCP = 866

I encountered the same problem while working on one of my projects (I used 
MSVC++ for compilation), and I never managed to find any workaround (though I 
tried hard, spent some time lurking around setlocale(), ios::imbue(), 
CharToOem()) but to use Unicode (wchar_t) and wide strings and streams.

Please inform me if there is a way to use pdf2djvu in English. I tried to 
convert a pdf, but unsuccessfully, and the problem is, I cannot understand the 
error message, it is in Mojibake. :)

Original comment by revzi...@gmail.com on 10 Jan 2012 at 8:28

GoogleCodeExporter commented 9 years ago
Apparently the console expects output in Windows-1521, even though 
GetConsoleOutputPC() returns 866. This is so broken.

Using wide strings I/O is not an option for me, unfortunately.

There are two methods for switching to English:
1) Temporary one: set LANGUAGE environment variable to "en".
2) Permanent one: remove the locale\ru\LC_MESSAGES\pdf2djvu.mo file.

Original comment by jwilk@jwilk.net on 10 Jan 2012 at 9:05

GoogleCodeExporter commented 9 years ago
Could you try to change console font a TrueType one and see if it helps?

Original comment by jwilk@jwilk.net on 20 Jan 2012 at 6:24

GoogleCodeExporter commented 9 years ago
Ping?

Original comment by jwilk@jwilk.net on 28 Jan 2015 at 12:37