Skip to content

Commit ee783f9

Browse files
committed
fixed hardcoded locale and updated the python setup file
1 parent a412620 commit ee783f9

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
.venv/
23
*.pyc
34
*.aff
45
*.dic

jamspell/utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void SaveFile(const std::string& fileName, const std::string& data) {
3232
}
3333

3434
TTokenizer::TTokenizer()
35-
: Locale("en_US.utf-8")
35+
: Locale(std::locale::classic())
3636
{
3737
}
3838

@@ -135,7 +135,7 @@ uint64_t GetCurrentTimeMs() {
135135
return ms.count();
136136
}
137137

138-
static const std::locale GLocale("en_US.UTF-8");
138+
static const std::locale GLocale(std::locale::classic());
139139
static const std::ctype<wchar_t>& GWctype = std::use_facet<std::ctype<wchar_t>>(GLocale);
140140

141141
void ToLower(std::wstring& text) {

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import os
22
import sys
3-
from distutils.command.build import build
4-
from distutils.command.build_ext import build_ext
3+
from setuptools.command.build import build
4+
from setuptools.command.build_ext import build_ext
55
from setuptools.command.install import install
6-
from distutils.spawn import find_executable
6+
from shutil import which as find_executable
77
from setuptools import setup
88
from setuptools.extension import Extension
99
import subprocess

0 commit comments

Comments
 (0)