When importing the netlist from schematic to layout, the log can be savedto "report.txt". This "text" file uses what I can only assume to beunicode quotation marks ("), making the file challenging to read using astandard text editor such as Vim. Please fix this text file so that it isreally just a text file, I don't see any advantage to the way it is now.
Original tags: pcbnew
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related or that one is blocking others.
Learn more.
When the log window is open, none of the other Kicad windows work, so tofix the errors listed, I have to close the window, in which case I can'tsee the list of errors. So the first thing I do is save the file and openit so that I can fix schematic errors. Also, I find myself swapping pinsin the layout often, and to sync up the schematic and layout, I have toopen the report.txt file. Because that file has everything listed in itinstead of just the mismatches, I have to search for pin changes, andreadability makes this easier. I can't recall exactly the problem I had,but I was doing some copying and pasting.Would something be lost if report.txt were simply a text file likeeverything else in Kicad?Thanks
I don't see the problem$ file report.txtreport.txt: ASCII textThe quotation marks are part ASCII. Please provide an example report if youstill think there is something to be fixed.
The file Robert attached doesn't use the ASCII quotation mark (checkedusing an hex editor) but I'm still able to read it using geany, gedit,nano, micro and vi.In linux the report saved uses the ASCII quotation mark.Application: kicadVersion: (6.0.0-rc1-dev-726-g82cb61b8a-dirty), release buildLibraries: wxWidgets 3.0.4 libcurl/7.61.0 GnuTLS/3.5.19 zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2(+libidn2/2.0.4) libssh2/1.8.0 nghttp2/1.32.0 librtmp/2.3Platform: Linux 4.18.0-1-amd64 x86_64, 64 bit, Little endian, wxGTKBuild Info: wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24 Boost: 1.62.0 OpenCASCADE Community Edition: 6.9.1 Curl: 7.61.0 Compiler: GCC 8.2.0 with C++ ABI 1013Build settings: USE_WX_GRAPHICS_CONTEXT=OFF USE_WX_OVERLAY=OFF KICAD_SCRIPTING=ON KICAD_SCRIPTING_MODULES=ON KICAD_SCRIPTING_WXPYTHON=OFF KICAD_SCRIPTING_ACTION_MENU=ON BUILD_GITHUB_PLUGIN=ON KICAD_USE_OCE=ON KICAD_USE_OCC=OFF KICAD_SPICE=OFF
I'm not familiar with unicode nor translating files, so I don't understandwhy making this text file at least partly incompatible with text editors isworth it. I would think that translating ascii is something that can bedone. I'm not 100% sure why the schematic and pcb files are also not heldto the same standard. Shouldn't they also move to unicode then (not that Iactually want that)? And finally, the Linux version appears to use ascii,so the differing standards also seems strange.
Kicad uses Unicode.But a text file is not necessary a ASCII7 text file. It is just not abinary file.All Kicad files use the UTF8 representation to code any Unicode char insidea text file, to ensure compatibility between different OS and differentlanguages in different countries, because many users use localized namesfor symbols, net names, comments... that are not ASCII7 codes.On Windows, I am using a text editor(SciTE) that can accept not only thecurrent code page (but if a file uses a given code page and a non ASCII7char, what I am seeing is no what a guy in a other country is seeing) orUTF8 coding for Unicode chars.Therefore, if the text file uses the UTF8 encoding, any user in any countrysee the same text (as long the text editor accept UTF8 coding)
Thanks for the explanation, it finally prompted me to actually get Vimworking with unicode (set encoding=utf-8). However, it's the inconsistencythat I don't understand. Looking at the other files Kicad produces(schematic, layout, project) they all use only ASCII characters, even forthe quotation mark (22), which I've verified with a hex editor. If I hadthe same problem with every other Kicad file, I would have figured it outbefore now, but since report.txt is the only file I've had this problemwith, that's why I opened the bug report. And according to Fabian, theLinux version uses ASCII for the quotation mark. I don't know what makesthis file special on Windows that it is treated differently.
I'm not sure why there is a unicode double quote in report files instead ofan ascii double quote but report files are for humans to read which entailsdifferent languages so ascii is not adequate. Board, schematic, project,etc. files on the other hand are for computers to read so they always haveto be in the same other than embedded strings which are utf8 encoded.
Hi Wayne, probably because they're exported from a HTML view(WX_HTML_REPORT_PANEL). I also agree that these files are intended to behuman-readable, not necessarily machine-readable. We might also remove thequotes from these report files, I don't believe they are absolutelynecessary around component designators/values in the report file.
I'm fine with going to single quotes if that resolves the issue. What Idon't understand is why double quotes would not be output as ascii unlessit has something to do with escaped characters in strings. I'll go aheadand make the change but technically it will still not make the report fileascii. Hopefully devs will see this and avoid using escaped characters inreport output strings in the future.
After doing some digging around, I found that this only effects the 5.0.0package. My development builds (including the 5.0 branch) create fileswith ascii double quote characters. It looks as though the problem has todo with how our package builders are building KiCad. Any ideas? I'm goingto leave the double quotes until we understand why there is a differencehere.