zsiki / GeoEasy

land surveying calculation, network adjustment, digital terrain models, regression calculation
http://digikom.hu/english/geo_easy_e.html
GNU General Public License v2.0
72 stars 34 forks source link

Non-Ascii filename? #160

Closed zvezdochiot closed 2 years ago

zvezdochiot commented 2 years ago

ℹ️ OS: Win 10.

Filename: T1T2.sdr 🆗

Filename: Станция T1,T2 (Алексей).sdr

can't read "coo_rec": no such variable
can't read "coo_rec": no such variable
    while executing
"GetVal {38 138} $coo_rec"
    (procedure "AddCoo" line 9)
    invoked from within
"AddCoo $fa $pn $x $y $z $code"
    (procedure "SdrCoo" line 20)
    invoked from within
"SdrCoo $fa $buf $pn $code $start $len "
    ("08" arm line 13)
    invoked from within
"switch -exact [string range $buf 0 1] {
            "00" {  ;# head record
                if {[string range $buf 4 8] == "SDR33"} {
                    set pnLength 16
                }
                set un [..."
    (procedure "Sdr" line 43)
    invoked from within
"Sdr $fn"
    ("*.sdr" arm line 2)
    invoked from within
"switch -glob [string tolower $fn] {
                *.job {
                    set res [Geodimeter $fn]
                    if {$res == 0} {    ;# try to load are too
                        set fn1 [file rootnam..."
    (procedure "MenuLoad" line 32)
    invoked from within
"MenuLoad ."
    (menu invoke)
zsiki commented 2 years ago

The file name of the loaded data set is used internally as a variable name. So it is a serious restriction to allowable file names. Until this issue is not solved you have to use letters of the English ABC, the underscore and numbers in the file name.

SOLUTION

Besides geoLoaded and geoLoadedDir lists a third is necessary for the name of the internally used array.

zsiki commented 2 years ago

Instead of a new array the geoLoaded list is changed to store internal names (fb_n - where n is an ordinal number). New function added to handle internal a short and full names.