Skip to content

Instantly share code, notes, and snippets.

View MIvanchev's full-sized avatar
💭
Perpetual burnout

Mihail Ivanchev MIvanchev

💭
Perpetual burnout
View GitHub Profile
@MIvanchev
MIvanchev / wine-8.20.patch
Created November 11, 2023 17:58
Adding an additional encoding to static-wine32.
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index 66e23114bfa..80283d3c69c 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -311,6 +311,7 @@ static void init_char_encoders(void)
} encoder[] =
{
{ "gbk", gbk_to_utf8, utf8_to_gbk },
+ { "gb2312", gbk_to_utf8, utf8_to_gbk },
{ "windows-1250", win1250_to_utf8, utf8_to_win1250 },
@MIvanchev
MIvanchev / wine-8.19.patch
Created November 10, 2023 16:25
Adding an additional encoding to static-wine32.
diff --git a/dlls/msxml3/main.c b/dlls/msxml3/main.c
index 66e23114bfa..80283d3c69c 100644
--- a/dlls/msxml3/main.c
+++ b/dlls/msxml3/main.c
@@ -311,6 +311,7 @@ static void init_char_encoders(void)
} encoder[] =
{
{ "gbk", gbk_to_utf8, utf8_to_gbk },
+ { "gb2312", gbk_to_utf8, utf8_to_gbk },
{ "windows-1250", win1250_to_utf8, utf8_to_win1250 },
@MIvanchev
MIvanchev / snippets.sh
Last active September 19, 2023 12:24
Random Linux snippets
# Get the amount of data written so far to the SSD /dev/sda (assumes a sector size of 512 byteas)
#
sudo smartctl -a /dev/sda | grep Total_LBAs_Written | sed 's/.*[ \t]\([0-9]*\)$/\1 * 512/' | bc | numfmt --to=iec --suffix=B
# Proper turn off procedure for the HDD /dev/sdb
#
sudo udisksctl unmount -b /dev/sdb
sudo udisksctl power-off -b /dev/sdb
@MIvanchev
MIvanchev / article.md
Last active December 3, 2024 08:00
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!