Menu

#572 Retrieving current OEM encoding

open
7
2009-12-02
2009-12-01
No

OEM encoding is used on Windows by the console (.bat, .cmd files). If a string contains diacritical characters, it must be converted from ANSI to OEM encoding prior to writing it to a .bat file.

Currently there's no way of getting the current OEM encoding in Tcl.

I suggest extending the "encoding" command to accept the "oem" parameter, that will return the current OEM encoding (just as the "system" parameter returns the current ANSI encoding).

I have no knowledge of OEM encoding on non-Windows systems, so I leave it to the experts (my first thought was it would just return the system encoding).

Discussion

  • Pawel Pawlak

    Pawel Pawlak - 2009-12-01
    • priority: 5 --> 7
     
  • Donal K. Fellows

    • labels: 322350 --> 10. Objects
    • assigned_to: nijtmans --> kennykb
     
  • Donal K. Fellows

    Probably easiest to make a windows-specific "oem" encoding. If such a thing is needed and not covered by one of our existing encodings, that is.