Repository: conan-io/conan

Issue:
[bug] Conan 2.0 fails to find Visual Studio Build Tools using the 'MSBuildToolchain'
### Environment details

* Operating System+version: Windows 10
* Compiler+version: msvc 2019 build tools
* Conan version: 2.0.0
* Python version: 3.9


### Steps to reproduce

1. Install the msvc 2019 build tools (a.k.a Visual Studio 16)
2. In a recipe, use the generator 'MSBuildToolchain'
3. and build

It fails finding the Visual Studio 16 __Build Tools__ installation with an error:

```
ERROR: Error in generator 'MSBuildToolchain': VS non-existing installation: Visual Studio 16
```

Note: I already tried to manually activate vcvars, but conan still does not find the installation.

### Logs

```
======== Finalizing install (deploy, generators) ========
conanfile.py (qt/5.15.8): Writing generators to C:\src\qt-conan\5.x.x
conanfile.py (qt/5.15.8): Generator 'MSBuildToolchain' calling 'generate()'
conanfile.py (qt/5.15.8): MSBuildToolchain created conantoolchain_release_x64.props
conanfile.py (qt/5.15.8): MSBuildToolchain writing conantoolchain.props
conanfile.py (qt/5.15.8): ERROR: Traceback (most recent call last):
  File "c:\local\miniforge3\lib\site-packages\conans\client\generators\__init__.py", line 70, in write_generators
    generator.generate()
  File "c:\local\miniforge3\lib\site-packages\conan\tools\microsoft\toolchain.py", line 104, in generate
    VCVars(self._conanfile).generate()
  File "c:\local\miniforge3\lib\site-packages\conan\tools\microsoft\visual.py", line 139, in generate
    vcvars = vcvars_command(vs_version, architecture=vcvarsarch, platform_type=None,
  File "c:\local\miniforge3\lib\site-packages\conan\tools\microsoft\visual.py", line 216, in vcvars_command
    cmd.append('call "%s" ' % _vcvars_path(version, vs_install_path))
  File "c:\local\miniforge3\lib\site-packages\conan\tools\microsoft\visual.py", line 232, in _vcvars_path
    raise ConanException("VS non-existing installation: Visual Studio %s" % version)
conans.errors.ConanException: VS non-existing installation: Visual Studio 16

ERROR: Error in generator 'MSBuildToolchain': VS non-existing installation: Visual Studio 16
```

Discussion:

Patch:
diff --git a/conan/tools/build/cppstd.py b/conan/tools/build/cppstd.py
index bdf08ca39..423c0a279 100644
--- a/conan/tools/build/cppstd.py
+++ b/conan/tools/build/cppstd.py
@@ -203,11 +203,17 @@ def _gcc_supported_cppstd(version):
 
 def _msvc_supported_cppstd(version):
     """
+    https://learn.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=msvc-170
+    - /std:c++14 starting in Visual Studio 2015 Update 3 (190)
+    - /std:c++17 starting in Visual Studio 2017 version 15.3. (191)
+    - /std:c++20 starting in Visual Studio 2019 version 16.11 (192)
     [14, 17, 20, 23]
     """
-    if version < "190":
+    if version < "190":  # pre VS 2015
         return []
-    if version < "191":
+    if version < "191":  # VS 2015
+        return ["14"]
+    if version < "192":  # VS 2017
         return ["14", "17"]
     if version < "193":
         return ["14", "17", "20"]
diff --git a/conans/client/conf/detect_vs.py b/conans/client/conf/detect_vs.py
index 5b2b91917..5db2f3850 100644
--- a/conans/client/conf/detect_vs.py
+++ b/conans/client/conf/detect_vs.py
@@ -114,6 +114,7 @@ def vswhere(all_=False, prerelease=False, products=None, requires=None, version=
     arguments.append(vswhere_path)
 
     # Output json format
+    arguments.append("-utf8")
     arguments.append("-format")
     arguments.append("json")
 
diff --git a/conans/client/profile_loader.py b/conans/client/profile_loader.py
index 6c51598f3..b94f9beaa 100644
--- a/conans/client/profile_loader.py
+++ b/conans/client/profile_loader.py
@@ -68,7 +68,8 @@ def _check_correct_cppstd(settings):
                     "14": "5.1",
                     "11": "4.5"}.get(cppstd)
         elif compiler == "msvc":
-            mver = {"20": "193",
+            mver = {"23": "193",
+                    "20": "192",
                     "17": "191",
                     "14": "190"}.get(cppstd)
         if mver and version < mver:


Test patch:
diff --git a/conans/test/unittests/tools/build/test_cppstd.py b/conans/test/unittests/tools/build/test_cppstd.py
index 2be74004e..b3d24c10a 100644
--- a/conans/test/unittests/tools/build/test_cppstd.py
+++ b/conans/test/unittests/tools/build/test_cppstd.py
@@ -79,8 +79,9 @@ def test_supported_cppstd_apple_clang(compiler, compiler_version, values):
 
 @pytest.mark.parametrize("compiler,compiler_version,values", [
     ("msvc", "180", []),
-    ("msvc", "190", ['14', '17']),
-    ("msvc", "191", ['14', '17', '20']),
+    ("msvc", "190", ['14']),
+    ("msvc", "191", ['14', '17']),
+    ("msvc", "192", ['14', '17', '20']),
     ("msvc", "193", ['14', '17', '20', '23']),
 ])
 def test_supported_cppstd_msvc(compiler, compiler_version, values):