You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Replace 'ascii' encoding for non-binary files with 'utf-8' encoding #122
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...
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.
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
Activity
jbrichau commentedon Aug 16, 2021
I discovered that the 'ascii' mode of the
MultiByteFileStreamdid 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.[-]Replace 'ascii' encoding for non-binary files with 'utf-8' encoding?[/-][+]Replace 'ascii' encoding for non-binary files with 'utf-8' encoding [/+]