Commit f3c8882
committed
std::os: Use unicode for last_os_error() on Win32
FormatMessageA may return non-ascii message,
which is encoded as system code page, not utf8.
This may cause `assert!(is_utf8(v))` failure on
some non-English machines.
This patch replaces it with FormatMessageW,
which returns utf-16 message.
Fixes `make check-stage2-std` failure on my machine. :)1 parent 1e745f1 commit f3c8882
1 file changed
+9
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
| 1138 | + | |
1139 | 1139 | | |
| 1140 | + | |
1140 | 1141 | | |
1141 | 1142 | | |
1142 | 1143 | | |
1143 | 1144 | | |
1144 | 1145 | | |
1145 | | - | |
| 1146 | + | |
1146 | 1147 | | |
1147 | 1148 | | |
1148 | 1149 | | |
1149 | | - | |
| 1150 | + | |
1150 | 1151 | | |
1151 | 1152 | | |
1152 | 1153 | | |
| |||
1155 | 1156 | | |
1156 | 1157 | | |
1157 | 1158 | | |
1158 | | - | |
| 1159 | + | |
1159 | 1160 | | |
1160 | 1161 | | |
1161 | 1162 | | |
1162 | | - | |
| 1163 | + | |
1163 | 1164 | | |
1164 | 1165 | | |
1165 | 1166 | | |
| |||
1173 | 1174 | | |
1174 | 1175 | | |
1175 | 1176 | | |
1176 | | - | |
| 1177 | + | |
1177 | 1178 | | |
1178 | 1179 | | |
1179 | 1180 | | |
1180 | | - | |
| 1181 | + | |
1181 | 1182 | | |
1182 | 1183 | | |
1183 | 1184 | | |
| |||
1190 | 1191 | | |
1191 | 1192 | | |
1192 | 1193 | | |
1193 | | - | |
1194 | | - | |
1195 | | - | |
| 1194 | + | |
1196 | 1195 | | |
1197 | 1196 | | |
1198 | 1197 | | |
| |||
0 commit comments