Further work on wchar_t portability
This commit is contained in:
parent
d0fc5ce5b9
commit
2a5b282143
3 changed files with 14 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
# Inweb 7
|
# Inweb 7
|
||||||
|
|
||||||
v7-alpha.1+1A54 'Escape to Danger' (7 July 2020)
|
v7-alpha.1+1A55 'Escape to Danger' (8 July 2020)
|
||||||
|
|
||||||
## About Inweb
|
## About Inweb
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
Prerelease: alpha.1
|
Prerelease: alpha.1
|
||||||
Build Date: 7 July 2020
|
Build Date: 8 July 2020
|
||||||
Build Number: 1A54
|
Build Number: 1A55
|
||||||
|
|
|
@ -119,6 +119,12 @@ int Characters::make_filename_safe(int charcode) {
|
||||||
return charcode;
|
return charcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wchar_t Characters::make_wchar_t_filename_safe(wchar_t charcode) {
|
||||||
|
charcode = Characters::remove_wchar_t_accent(charcode);
|
||||||
|
if (charcode >= 128) charcode = '-';
|
||||||
|
return charcode;
|
||||||
|
}
|
||||||
|
|
||||||
@ The following strips the accent, if present, from an ISO Latin-1 character:
|
@ The following strips the accent, if present, from an ISO Latin-1 character:
|
||||||
|
|
||||||
=
|
=
|
||||||
|
@ -148,3 +154,8 @@ int Characters::remove_accent(int charcode) {
|
||||||
}
|
}
|
||||||
return charcode;
|
return charcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wchar_t Characters::remove_wchar_t_accent(wchar_t charcode) {
|
||||||
|
return (wchar_t) Characters::remove_accent((int) charcode);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue