Closed codingisacopingstrategy closed 14 years ago
I modified the behaviour in 235ce0aa5773d5d798614955015a32e83e77fa90. The editor shows a warning if the file seems to be binary. If the encoding is binary (Ascii-8bit) in ruby 1.9 an error is shown and the file cannot be edited.
Thanks, it works for me now. Although the described behaviour in Ruby 1.9 seems undesirable? Isn’t almost all text Ascii-8bit, especially for Europeans?
No in ruby 1.9 utf-8 is allowed. If the encoding is not utf-8 but ascii-8bit, it is a binary file (for example an image). Then it cannot be edited this way. The check is done by forcing the encoding to utf-8 (force_encoding) and checking the encoding afterwards via valid_encoding?. If the encoding is invalid, it is assumed, that the file is binary.
fixed
Using the wiki creole backend.
Editing pages works fine, until I insert a non ascii character (like a typographic quote ‘, or an é). Saving works, but trying to then edit gives an error: