-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swift 6 cannot open correctly a windowsCP1252 file in linux (worked on swift 5 and macos) #78382
Comments
I can agree with that. We also have this issue, by reading a file from Windows. We read large TXT files line by line. We do this using a FileHandle. If we use the Swift windowsCP1252 encoding, we do not receive a single line. This situation exists not only under Linux but also under Windows. We have implemented the WindowsCP-1252 encoding manually.
Just for the sake of completeness, we compiled our application with the latest Swift SDK for Windows at the time. (Swift 6.0.1) |
You can simply use the Default Swift Encoding mechanism when you running the App on macOS. This can be archived by the following change:
|
Description
Opening a file that is an export of transactions from an spanish bank (Caixa enginyers) which is an xls (html+latin1252) it gives a bad format using swift 6 compiler in linux. In mac-os or using swift 5.10 compiler works fine
Reproduction
Download the sample file:
https://github.com/Dracks/mr-scrooge/blob/mr-scrooge-3.0.0/src/swift-server-tests/test_files/MovimientosCuenta.xls
Expected behavior
get's the contents of the file in fileString variable. (Now the second ward execute the else case)
Environment
Swift version 6.0.2 (swift-6.0.2-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional information
The link is a sample file exported from my bank, and anonymized, that I've got to run tests of my app. But today I expecuted it on my machine using the original file downloaded from the bank account and the same happened.
The text was updated successfully, but these errors were encountered: