hanai3Bi / Switch-OC-Suite

Overclocking suite for Nintendo Switch devices running Atmosphere CFW
Other
310 stars 20 forks source link

patch.py doesn't work with ams 1.6.2 loader! #49

Open HeikesFootSlave opened 11 months ago

HeikesFootSlave commented 11 months ago

If I use the patch.py script I get those errors! Is that intended or normal?

`becky@BFS-PC MINGW64 ~/atmosphere/stratosphere/loader/source

py patch.py

HEAD ist jetzt bei 872c18c50 kern: fix some comment typos Traceback (most recent call last): File "C:\msys64\home\becky\atmosphere\stratosphere\loader\source\patch.py", line 29, in file_replace_str(ldr_process_creation, File "C:\msys64\home\becky\atmosphere\stratosphere\loader\source\patch.py", line 10, in file_replace_str content = f.read() ^^^^^^^^ File "C:\Program Files\Python312\Lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 8178: character maps to

`

Doesn't matter if I use MSYS terminals (normal MSYS2 or the used MINGW64) or Powershell or CMD! All the time I get those messages!

hanai3Bi commented 11 months ago

use python3. also use linux if you have problems on windows

HeikesFootSlave commented 11 months ago

MSYS2 is Linux Environment on Windows using pacman! And I only have Python 3.12 installed!

But I try again on Linux!

hanai3Bi commented 11 months ago

of course i know that. and msys2 or mingw or whatever is not linux, what i meant was real linux.

check again if you actually ran with 'python3' because sometimes default python is set to python2 (which comes pre installed)

HeikesFootSlave commented 10 months ago

@hanai3Bi Found the error and a Solution to the Problem!

python used the encoding languange = cp1252 (germany) but it has to be UTF-8!

If someone has the same Problem on Windows:

`How to enable UTF-8:

Control Panel > Clock and Region > Region > Administrative tab > Change system locale button > enable Beta:Use Unicode UTF-8 for worldwide language support.

The same GUI window can also be launched from Settings > Time & Language > Language & region > Administrative language settings > Administrative tab > Change system locale button > enable Beta:Use Unicode UTF-8 for worldwide language support. `

Should help! You could put it into the Readme.md under compile section ;)