Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

more graceful handling of boost regex icu initialization failure #1777

Closed
springmeyer opened this Issue Mar 28, 2013 · 3 comments

Comments

Projects
None yet
1 participant
Owner

springmeyer commented Mar 28, 2013

If the icudata library cannot be loaded boost will throw in the constructor for an individual u32regex object (this is a common problem when icu data is stored in a .dat file, which itself is advantageous to avoid bloat when targeting multiple architectures). The impact of this in Mapnik is that rendering will abort after boost throws a std::runtime_error("Could not initialize ICU resources").

Perhaps at startup we could check for support and instead of failing for every tile rendered the non unicode regex function could be used (essentially a global runtime fallback).

Owner

springmeyer commented Apr 2, 2013

Boost regex calls the icu collator, which is what throws when the icu.dat file is not found. I'm not even sure we need that support? And maybe we could even use icu directory to support unicode regex and not mess with the boost regex wrapper and avoid the whole compile time issue of whether boost support ICU or not: http://userguide.icu-project.org/strings/regexp

Owner

springmeyer commented Apr 2, 2013

/cc @artemp

Owner

springmeyer commented Sep 6, 2014

most viable thing is using std::regex once it is ready: #1813

@springmeyer springmeyer closed this Sep 6, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment