Skip to content

Accented characters from spreadsheet file don't display correctly #16

@4er4er4er

Description

@4er4er4er

A user wants to read a set from this sheet, in an xlsx file (also attached) created by Excel:

image

The amplxl driver is used like this:

set FAMILY;
table FAMILY "amplxl" "FAMILY.xlsx": [FAMILY] IN;
read table FAMILY;
display FAMILY;

But under Windows, the set displays like this in a command window,

image

and like this in the IDE:

image

The problem is that Excel uses UTF-8 encoding, while the command window and the IDE are displaying the set member names using different extended ASCII encodings. AMPL stores the correct UTF-8 bytes, so that results written out to a spreadsheet do show the correct accented characters.

It's not clear what to recommend to the user, other than to avoid accented (and other non-ASCII) characters in the spreadsheet, but I'm opening this issue in case anyone has an idea.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions