Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: specify the encoding format for output #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doxypypy/doxypypy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,11 @@ def argParse():
"With this option decorators are kept before it's definition string"
"(function or class names). But this requires dogygen 1.9 or higher."
)
parser.add_argument(
"-p", "--output-encoding",
action="store", type=str , dest="output_encoding",default="utf-8",
help="Specify the encoding format for the output"
)
group = parser.add_argument_group("Debug Options")
group.add_argument(
"-d", "--debug",
Expand Down Expand Up @@ -1108,6 +1113,7 @@ def argParse():
# There is a "feature" in print on Windows. If linesep is
# passed, it will generate 0x0D 0x0D 0x0A each line which
# screws up Doxygen since it's expected 0x0D 0x0A line endings.
sys.stdout = codecs.getwriter(args.output_encoding)(sys.stdout.detach())
for line in astWalker.getLines().split(linesep):
print(line.rstrip())

Expand Down