random-builder / kicad_freerouting-plugin

KiCad FreeRouting.jar round trip invoker
Apache License 2.0
54 stars 12 forks source link

UTF-8 characters are considered illegal? #5

Closed linuxcf closed 5 years ago

linuxcf commented 5 years ago

Some of my netnames contain UTF-8 characters, which KiCAD on my stock Ubuntu 16.04LTS handles fine, but the freerouting plugin crashes telling me it found illegal characters.

Andrei-Pozolotin commented 5 years ago

please attach:

linuxcf commented 5 years ago

I am not sure how to obtain the stack trace.

I have enclosed a zipped simple project directory with troublesome files. You should be able to retrieve all components in the schematic from the rescue lib.

autoroutedemo.zip

linuxcf commented 5 years ago

Update: There are two directories, 'jar1' and 'jar2', under '~/.kicad_plugins/kicad_freerouting-plugin/jar', each containing its own 'Freerouting.jar' file. The java file that crashes because it does not like "μ', as described above, is in 'jar2'. The one in 'jar1' just hangs without any messages.

Andrei-Pozolotin commented 5 years ago

ok, I can reproduce

Exception in thread "main" java.lang.Error: Illegal character <μ>
    at designformats.specctra.SpecctraFileScanner.next_token(SpecctraFileScanner.java:1407)
    at designformats.specctra.Network.read_net_scope(Network.java:314)
    at designformats.specctra.Network.read_scope(Network.java:85)
    at designformats.specctra.ScopeKeyword.read_scope(ScopeKeyword.java:110)
    at designformats.specctra.DsnFile.read(DsnFile.java:82)
    at interactive.BoardHandling.import_design(BoardHandling.java:1087)
    at gui.BoardFrame.read(BoardFrame.java:125)
    at gui.MainApplication.createBoardFrame(MainApplication.java:184)
    at gui.MainApplication.main(MainApplication.java:150)
Andrei-Pozolotin commented 5 years ago

try jar3 form develop branch:

cd $HOME/.kicad_plugins
git clone https://github.com/random-builder/kicad_freerouting-plugin.git
cd kicad_freerouting-plugin
git checkout develop
git pull
linuxcf commented 5 years ago

It worked! It autorouted, importing the DRC rules from KiCAD. It did not complain about extended UTF-8 characters. I imported the .SES file into KiCAD fine. However, I think it failed to realize that some vias and through-hole test points were already connected to the GND net. I will take another close look and play with it to gain more experience. I think this issue should be closed

I think this issue should be closed. If there are any other refinements that need to be made, they should probably be opened under separate issues. Thank you for your great work!

Andrei-Pozolotin commented 5 years ago

you are welcome