[libvoikko] Possible encoding bug in latest voikkospell

Sjur Moshagen sjurnm at mac.com
Fri Mar 20 00:16:54 EET 2015


19. mars 2015 kl. 22:57 skrev Sjur Moshagen <sjurnm at mac.com>:
> 
> 12. jan. 2015 kl. 20:27 skrev Sjur Moshagen <sjurnm at mac.com>:
>>> 
>>> I don't know what is going on then. It might make sense to test different 
>>> compilers (g++ or clang++, different Xcode versions).
>> 
>> I haven’t had the chance to test different compilers and xcode versions, but that seems like a reasonable suggestion, especially since this bug has manifestated itself after upgrading both the os and xcode.
> 
> I installed gcc49 via MacPorts, selected it using gcc_select (also from MacPorts), and then rebuilt libvoikko:
[...]
> Undefined symbols for architecture x86_64:
>  "hfst_ol::ZHfstOspeller::read_zhfst(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
> 
> I guess I have to rebuild hfst-ospell as well using gcc49.

I did, and that helped, the compilation of libvoikko went through without issues. But usage was another matter:

$ echo työö | voikkospell -s -d fkv | iconv -f latin1 -t UTF-8
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid

And to repeat with the example from earlier in this thread:

$ echo arrát | voikkospell -s -d se
terminate called after throwing an instance of 'std::runtime_error'
  what():  locale::facet::_S_create_c_locale name not valid
Abort trap: 6

Something seems to be wrong in that function on the newest MacOSX system.

Sjur



More information about the Libvoikko mailing list