commit 2e9fac41c5c7ed0b1dc8b5be8b08f1644cf6d732 Author: Daniel Swanson Date: Tue Jun 1 18:53:22 2021 -0500 lt-print seems to be working diff --git a/lttoolbox/alphabet.cc b/lttoolbox/alphabet.cc index 5345538..9ac7cd1 100644 --- a/lttoolbox/alphabet.cc +++ b/lttoolbox/alphabet.cc @@ -159,9 +159,9 @@ Alphabet::read(FILE *input) while(tam > 0) { tam--; - UString mytag{'<'}; - mytag.append(Compression::string_read(input)); - mytag += (UChar)'>'; + UString mytag = "<"_u; + mytag += Compression::string_read(input); + mytag += ">"_u; a_new.slexicinv.push_back(mytag); a_new.slexic[mytag]= -a_new.slexicinv.size(); // ToDo: This does not turn the result negative due to unsigned semantics } diff --git a/lttoolbox/transducer.cc b/lttoolbox/transducer.cc index 605d45f..cf534a1 100644 --- a/lttoolbox/transducer.cc +++ b/lttoolbox/transducer.cc @@ -724,7 +724,8 @@ Transducer::escapeSymbol(UString& symbol, bool hfst) const } else { - symbol = "ε"_u; + //symbol = "ε"_u; + symbol += (UChar)949; } } else if(hfst && symbol == " "_u) @@ -749,11 +750,11 @@ Transducer::show(Alphabet const &alphabet, UFILE *output, int const epsilon_tag, UString l; alphabet.getSymbol(l, t.first); escapeSymbol(l, hfst); - u_fprintf(output, "%ls\t", l.c_str()); + u_fprintf(output, "%S\t", l.c_str()); UString r; alphabet.getSymbol(r, t.second); escapeSymbol(r, hfst); - u_fprintf(output, "%ls\t", r.c_str()); + u_fprintf(output, "%S\t", r.c_str()); u_fprintf(output, "%f\t\n", it2.second.second); } }