Skip to content

Commit

Permalink
Fix inconsistent behavior of utf::segmenter on non-US locales.
Browse files Browse the repository at this point in the history
Using icu::Locale::getDefault() can return different things on different
platforms, so to make things consistent we'll force a US locale to be used
for the icu::BreakIterators for now.
  • Loading branch information
CanoeFZH authored and Chase Geigle committed Jun 13, 2015
1 parent 978f519 commit 547d045
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utf/segmenter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class segmenter::impl
impl()
{
auto status = U_ZERO_ERROR;
const auto& locale = icu::Locale::getDefault();
const auto& locale = icu::Locale::getUS();
sentence_iter_.reset(
icu::BreakIterator::createSentenceInstance(locale, status));
word_iter_.reset(
Expand Down

0 comments on commit 547d045

Please sign in to comment.