Comments (7)
You always have a vote, my friend π
from brain-brew.
I'll prepare a PR then.
On a side-note, I have noticed that there is also a problem with encoding, namely if I use Umlauts in fields name (ΓΌ
comes to mind), then I will get a mixture of UTF-8 and cp1252 files. Is that also something Windows/Windows + Python related, i.e., on Linux non-ASCII should work fine? It's also something I could look into, but that sounds like a heavy change, because alls the reads/writes have to be fixed to UTF-8 instead of defaulting. Would that also be something interesting or should I just live with the fact that my fields should not contain high-ASCII/non-ASCII characters?
from brain-brew.
So far I have seen cp1252 only in YAML files generated with anki_to_sources
recipes and problems with non-ASCII in sources_to_anki
as well (i.e., mojibake in the resulting deck.json). I'll investigate and if it's not too many changes I will roll it together into a single PR with the regex fix.
from brain-brew.
I haven't looked at #43 in a while, so I'm not 100% sure, but I think the PR itself is independent of the issue here (it's about replacing the old codecs.open
with just open
).
The discussion in "Aside on newlines" probably is vaguely relevant (but again not 100% sure) β I believe that in order to allow Windows and Linux users to inter-operate peacefully (without a back-and-forth war between \n
and \r\n
) we will need to add newline=''
to the open
call.
Maybe, though, let's just cross this once we encounter this in the wild? (i.e. if I had a vote, I'd vote for just applying anything that @AFulgens needs, for now. :))
from brain-brew.
Please do π I haven't done much testing on Windows myself, so thanks for fixing this π
from brain-brew.
Possibly related to #43? π
from brain-brew.
Would that also be something interesting
IMO yes, definitely!
Is there cp1252 outside the YAML files? AFAICT all the other (i.e. except the two in yaml_object.py
) relevant calls to open
explicitly specify a UTF-8 encoding, so the CSV files, HTML files etc. should all just have UTF-8.
(The calls in setup.py
and scripts/yamale_build.py
also don't have an encoding specified, but that shouldn't affect the main operation of BrainBrew.)
from brain-brew.
Related Issues (16)
- Filenames that are too long are not found HOT 1
- Composable, extendable and customisable decks HOT 10
- Note Model Generation
- Media Filenames and Cleanup
- Note Model Required Fields should be generated HOT 3
- CrowdAnki Subdecks are not Supported Fully HOT 1
- Feedback from UG set-up HOT 16
- UnicodeDecodeError in UG HOT 6
- Conflict with assetmanger plugin?? HOT 4
- issues importing data from csv HOT 2
- html_file.py cannot read utf-8 file in chinese windows HOT 5
- AttributeError: 'CrowdAnkiExport' object has no attribute 'note_models' HOT 3
- UnicodeDecodeError with source_to_anki HOT 8
- Sync to yaml file HOT 1
- Checking the number of rows in all columns is same (or less-than-or-equals?) as number of headers (per file) (error-reporting)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from brain-brew.