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:
parent
044e2f4038
commit
59943926a8
1 changed files with 9 additions and 1 deletions
|
@ -10,7 +10,15 @@ use Test::More tests => 8;
|
||||||
use DBI;
|
use DBI;
|
||||||
use Encode qw/decode/;
|
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
|
my @words = qw/berger Bergère bergère Bergere
|
||||||
HOT hôte
|
HOT hôte
|
||||||
|
|
Loading…
Add table
Reference in a new issue