Generating the manual on Windows fails due to console encoding #130

Open
niol opened this Issue Dec 11, 2013 · 2 comments

Projects

None yet

3 participants

@niol
niol commented Dec 11, 2013

Maybe encoding on Windows should be forced to UTF-8.

D:\DATA\Documents\home\local\tj3man>tj3man -m
TaskJuggler v3.5.0 - A Project Management Software

Copyright (c) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
              by Chris Schlaeger <chris@linux.com>

This program is free software; you can redistribute it and/or modify it under
the terms of version 2 of the GNU General Public License as published by the
Free Software Foundation.

←[31mFatal: incompatible character encodings: UTF-8 and CP850
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:126:in `block in to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:126:in `block in to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:126:in `block in to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:126:in `block in to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLElement.rb:120:in `to_s'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLDocument.rb:57:in `block in write'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLDocument.rb:56:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/XMLDocument.rb:56:in `write'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/RichText/Snip.rb:91:in `generateHTML'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/RichText/Document.rb:103:in `block in generateHTML'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/RichText/Document.rb:102:in `each'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/RichText/Document.rb:102:in `generateHTML'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/UserManual.rb:83:in `generateHTML'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/UserManual.rb:69:in `generate'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/apps/Tj3Man.rb:68:in `appMain'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/Tj3AppBase.rb:146:in `main'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/tj3man.rb:16:in `<top(required)>'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/bin/tj3man:4:in `<top (required)>'
C:/Ruby193/bin/tj3man:23:in `load'
C:/Ruby193/bin/tj3man:23:in `<main>'

*******************************************************************************
You have triggered a bug in TaskJuggler version 3.5.0!
Please see the user manual on how to get this bug fixed!
http://www.taskjuggler.org/tj3/manual/Reporting_Bugs.html#Reporting_Bugs_and_Feature_Requests
*******************************************************************************
←[0m
C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/MessageHandler.rb:301:in `addMessage': RuntimeError (RuntimeError)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/MessageHandler.rb:190:in `fatal'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/MessageHandler.rb:312:in `fatal'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/Tj3AppBase.rb:161:in `rescue in main'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/taskjuggler/Tj3AppBase.rb:127:in `main'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/lib/tj3man.rb:16:in `<top (required)>'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/taskjuggler-3.5.0/bin/tj3man:4: in `<top (required)>'
        from C:/Ruby193/bin/tj3man:23:in `load'
        from C:/Ruby193/bin/tj3man:23:in `<main>'
@scrapper
Member

Where is the CP850 encoded data coming from? Is you system configured to use CP850? Or have the TJ3 files been re-coded to CP850?

For proper operation, all files need to be UTF-8 and the runtime environment must be running with UTF-8.

@scrapper scrapper added the Need Info label Mar 10, 2014
@chris2fr
chris2fr commented May 4, 2014

Try chcp 65001 before running the command. I think 65001 is UTF-8 in Windowspeak. In general, I chcp 65001 before doing anything.

Stack overflow suggests even doing this system-wide here:
reg add hklm\system\currentcontrolset\control\nls\codepage -v oemcp -d 65001

http://stackoverflow.com/questions/14109024/how-to-make-unicode-charset-in-cmd-exe-by-default

Can we perhaps have a tj3 windows commands do this for the user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment