Ticket #5153 (closed bug: duplicate)

Opened 2 years ago

Last modified 2 years ago

System.Environment.getArgs does not UTF-8 decode arguments even in UTF-8 locale

Reported by: Athas Owned by:
Priority: normal Milestone:
Component: libraries/base Version: 7.0.3
Keywords: utf-8, utf8, unicode, getArgs, options, argv Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

getArgs is implemented as simply dereferencing argv and returning a list of the octets passed as arguments, resulting in unexpected results for multibyte characters. I think it would be more natural if getArgs performed locale-relevant decoding, and a more low-level function (perhaps returning ByteStrings?) was available for when you really want the raw arguments.

Change History

Changed 2 years ago by Athas

  • status changed from new to closed
  • resolution set to duplicate

Sorry, it appears that this is a dupe of #3307.

Note: See TracTickets for help on using tickets.