1
0
Fork 0
mirror of https://github.com/DBD-SQLite/DBD-SQLite synced 2025-06-07 14:19:10 -04:00

DBD-SQLite: use locale may not work well under the windows, especially for the non-westerners

This commit is contained in:
Kenichi Ishigaki 2009-04-01 10:44:07 +00:00
parent 044e2f4038
commit 59943926a8

View file

@ -10,7 +10,15 @@ use Test::More tests => 8;
use DBI;
use Encode qw/decode/;
BEGIN {
# sadly perl for windows (and probably sqlite, too) may hang
# if the system locale doesn't support european languages.
# en-us should be a safe default. if it doesn't work, use 'C'.
if ($^O eq 'MSWin32') {
use POSIX 'locale_h';
setlocale(LC_COLLATE, 'en-us');
}
}
my @words = qw/berger Bergère bergère Bergere
HOT hôte