Skip to content

DEGREE SIGN character in projinfo output is incorrectly displayed on MS Windows console #1828

@agiudiceandrea

Description

@agiudiceandrea

On MS Windows 7 64 bit localized in Italian, the output of projinfo (6.2.1) tool can contain the DEGREE SIGN character (U+00B0 | ° | \xc2\xb0) that is incorrectly displayed in the command prompt console, e.g. the OSGeo4W Shell:

image

The default console codepage is 850 | ibm850 | OEM Multilingual Latin 1; Western European (DOS)

Is it possible to properly encode/decode the DEGREE SIGN character in the string "Operation n°" or to avoid the use of such character (e.g. using "Operation n.")?
I would also add a space at the end of the string to separate it from the number that follows.

The problem also occurs changing the codepage to 65001 | utf-8 | Unicode (UTF-8) when the font used in the shell is non TrueType (the default font is Raster type).

PROJ/src/apps/projinfo.cpp

Lines 689 to 692 in 529eb50

std::cout << "Operation n"
"\xC2\xB0"
<< (i + 1) << ":" << std::endl
<< std::endl;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions