Closed BrianInGermany closed 4 years ago
@DarmstadtBri, thanks for the contribution! If not difficult, send a minimal example with expected and actual results.
It seems to be working fine:
Input:
a,b
ä,ö
Output:
| a | b |
| - | - |
| ä | ö |
Hi Lev,
Thanks for writing the library! Attached is a sample table and result. Maybe you could add a parameter for encoding.
Another error: If the CSV contains empty lines, it writes an empty markdown table.
Cheers,
Brian
word;status |
---|
Ãœber;bad |
Redefreiheit;good |
Fußball;bad |
östlich;bad |
Fähre;bad |
noUmlaut;good |
Weizen;good |
Korn;good |
Original CSV:
word;status Über;bad Redefreiheit;good Fußball;bad östlich;bad Fähre;bad noUmlaut;good Weizen;good Korn;good
Hi Lev, Thanks for writing the library! Attached is a sample table and result. Maybe you could add a parameter for encoding. Another error: If the CSV contains empty lines, it writes an empty markdown table. Cheers, Brian | word;status | | ----------------- | | Über;bad | | Redefreiheit;good | | Fußball;bad | | östlich;bad | | Fähre;bad | | noUmlaut;good | | Weizen;good | | Korn;good |
I have opened a separate issue for the ";" delimiter not working.
It still working for me fine (with version 1.1.2
):
csv2md a.csv -d ";" > a.md
Original CSV and result: archive.zip.
Maybe you need check encoding on your host machine?
It still working for me fine:
csv2md a.csv -d ";" > a.md
Original CSV and result: archive.zip.
Maybe you need check encoding on your host machine?
Aha. I did not save to file, but copied out of the console
It still working for me fine:
csv2md a.csv -d ";" > a.md
Original CSV and result: archive.zip. Maybe you need check encoding on your host machine?
Aha. I did not save to file, but copied out of the console
Hm, maybe you have to set encoding to UTF-8 in your terminal:)
Strange, even when I write to file I get this on windows: mdTable.txt
word | status |
---|---|
Über | bad |
Redefreiheit | good |
Fußball | bad |
├╢stlich | bad |
Fähre | bad |
noUmlaut | good |
Weizen | good |
Korn | good |
Strange, even when I write to file I get this on windows: mdTable.txt
word status Über bad Redefreiheit good Fußball bad östlich bad Fähre bad noUmlaut good Weizen good Korn good
The symbols have changed strangely.
I'm totally sure that Windows tries to write the result with it's own encoding. That's why you get such result. I've opened my a.md
with win-1251
encoding and got the same strange symbols. Unfortunately, I haven't used Windows for five years and don’t know how to help you. Maybe you need to change global system encoding to UTF-8.
I'm totally sure that Windows tries to write the result with it's own encoding. That's why you get such result. I've opened my
a.md
withwin-1251
encoding and got the same strange symbols. Unfortunately, I haven't used Windows for five years and don’t know how to help you. Maybe you need to change global system encoding to UTF-8.
Ok, that could well be the cause. Thanks for the help.
Tried it on another windows computer even, and it is working fine. Must be a setting on my other machine.
tables with "ä" "ö" etc. are not generating correctly.