Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTF-8 Check fails on windows in Powershell #2173

Closed
Gizmokid2005 opened this issue Aug 14, 2021 · 0 comments · Fixed by #2174
Closed

UTF-8 Check fails on windows in Powershell #2173

Gizmokid2005 opened this issue Aug 14, 2021 · 0 comments · Fixed by #2174
Labels
Bug Things to squish; generally used for issues Windows
Milestone

Comments

@Gizmokid2005
Copy link
Contributor

Description

The current version of sopel in pip (py3.9.6) and from git master both prompt this message upon running sopel even with a utf8 configuration:

WARNING!!! You are running with a non-UTF8 locale environment variable (e.g. LC_ALL is set to "C"), which makes Python 3 do stupid things. If you get strange errors, please set it to something like "en_US.UTF-8".

Despite having a "English_United States", "utf8" locale from python.

Reproduction steps

Pull into a fresh python dev environment on windows 10.
Install sopel via pip or from source.
Run sopel.

Expected behavior

To not get a warning about UTF-8 since it's configured.

Logs

(.venv) PS C:\Users\Michael\Documents\Visual Studio Projects\Python\sopel> $PSVersionTable     

Name                           Value
----                           -----
PSVersion                      7.1.4
PSEdition                      Core
GitCommitId                    7.1.4
OS                             Microsoft Windows 10.0.19041
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

(.venv) PS C:\Users\Michael\Documents\Visual Studio Projects\Python\sopel> Get-WinSystemLocale 

LCID             Name             DisplayName
----             ----             -----------
1033             en-US            English (United States)

(.venv) PS C:\Users\Michael\Documents\Visual Studio Projects\Python\sopel> echo $OutputEncoding

Preamble          :      
BodyName          : utf-8
EncodingName      : Unicode (UTF-8)
HeaderName        : utf-8
WebName           : utf-8
WindowsCodePage   : 1200
IsBrowserDisplay  : True
IsBrowserSave     : True
IsMailNewsDisplay : True
IsMailNewsSave    : True
IsSingleByte      : False
EncoderFallback   : System.Text.EncoderReplacementFallback
DecoderFallback   : System.Text.DecoderReplacementFallback
IsReadOnly        : True
CodePage          : 65001


(.venv) PS C:\Users\Michael\Documents\Visual Studio Projects\Python\sopel> py
Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
('English_United States', 'utf8')
>>> exit()

Environment

  • Sopel .version: 8.0.0
  • Sopel installed via: pip && source
  • Python version: 3.9.6
  • Operating system: Windows 10
  • IRCd /version: N/A
  • Relevant plugins: N/A
@Gizmokid2005 Gizmokid2005 added the Bug Things to squish; generally used for issues label Aug 14, 2021
@dgw dgw added this to the 7.1.6 milestone Nov 1, 2021
@dgw dgw added the Windows label Nov 1, 2021
@dgw dgw closed this as completed in #2174 Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Things to squish; generally used for issues Windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants