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

Fix encoding issues when displaying time zone in Zenmap #550

Open
dmiller-nmap opened this issue Sep 12, 2016 · 2 comments
Open

Fix encoding issues when displaying time zone in Zenmap #550

dmiller-nmap opened this issue Sep 12, 2016 · 2 comments

Comments

@dmiller-nmap
Copy link

In this screenshot from an unrelated bug report, the time zone (Malay Standard Time) is not shown in the proper encoding in the Nmap Output window. We should be able to correct this by detecting and passing along the encoding in a few places:

  • user's display encoding (Zenmap uses this properly as evidenced by the correct display of the translation language)
  • terminal encoding info passed in the environment to Nmap (determines what encoding will be used to output the date)
  • encoding used to decode the output of Nmap (this is probably where the fix should be).

The screenshot is on Windows, but Python environment should make it possible to do this in a portable manner.

bug

@Varunram
Copy link

Varunram commented Jan 27, 2017

@dmiller-nmap When going through NmapParser, I noticed that we do pass sys.getpreferredencoding to zenmap. When I ran
time.strftime("%B %d, %Y - %H:%M").decode(locale.getpreferredencoding())
it seems to print the right output. And since it prints the first parts of the output correct, the encoding must have been passed on or else an error ("Unable to properly format host start time") would've been printed. Any suggestions as to where else the problem might be? And could this be remotely related to #638 ?

@heheda123123
Copy link

the same issue in windows cli version
image

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

No branches or pull requests

3 participants