Skip to content

Replace 'ascii' encoding for non-binary files with 'utf-8' encoding  #122

Closed

Description

@jbrichau

There is a distinction between text and binary files in the filestream methods of Grease. Text files are considered to use the 'ascii' encoding when reading/writing them in Grease. However, text files are nowadays commonly using/requiring utf8 encoding. See issue in SeasideSt/Seaside#1273

It's probably acceptable to use utf8 for text files because:

  • utf8 is backwards compatible with ascii encoding
  • Pharo uses utf8 for internal string encoding

Leaves me with the quibble that utf8 encoded files are actually binary files, so this difference between 'text' and 'binary' files leaves me wondering if this still makes sense...

Activity

  1. jbrichau commented on Aug 16, 2021

    @jbrichau
    MemberAuthor

    I discovered that the 'ascii' mode of the MultiByteFileStream did actually already use the UTF8Converter prior to version 1.6.0! The changes in 1.6.0 that moved to the new filestreams api actually changed it to ascii. That was very confusing, so this is actually a bug that was introduced in 1.6.0.

  2. changed the title [-]Replace 'ascii' encoding for non-binary files with 'utf-8' encoding?[/-] [+]Replace 'ascii' encoding for non-binary files with 'utf-8' encoding [/+] on Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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