diff options
author | jozan <jozan@noemail.net> | 2020-11-12 21:38:35 +0000 |
---|---|---|
committer | jozan <jozan@noemail.net> | 2020-11-12 21:38:35 +0000 |
commit | 560f737bc6920e72cf00602c8b70c93c4a146f00 (patch) | |
tree | 6bcba5bd821eef510c200ee9e6bd7b48d14b115c | |
parent | In progress (diff) | |
download | unixize-560f737bc6920e72cf00602c8b70c93c4a146f00.tar.gz unixize-560f737bc6920e72cf00602c8b70c93c4a146f00.tar.bz2 unixize-560f737bc6920e72cf00602c8b70c93c4a146f00.tar.xz unixize-560f737bc6920e72cf00602c8b70c93c4a146f00.tar.zst unixize-560f737bc6920e72cf00602c8b70c93c4a146f00.zip |
Update
FossilOrigin-Name: 3b6504148a041336ea6202ff6811be99ed8001a42631c4e302154f6c496d3452
-rw-r--r-- | src/c_subst.c | 19 | ||||
-rw-r--r-- | src/c_subst.h | 4 | ||||
-rw-r--r-- | src/c_unixize.c | 3 |
3 files changed, 25 insertions, 1 deletions
diff --git a/src/c_subst.c b/src/c_subst.c index 0291dc7..de09514 100644 --- a/src/c_subst.c +++ b/src/c_subst.c @@ -311,6 +311,25 @@ c_unicode_subst(char filename[]) ); c_unicode_subst(filename); } + if (u_isucharset((unsigned char)*(p + 1), C_CHARSET_Y) == TRUE) { + *p = 'y'; + memmove( + p + 1, + p + 2, + (strlen((const char*)p + 2) + 1) * sizeof(char) + ); + c_unicode_subst(filename); + } + if (u_isucharset((unsigned char)*(p + 1), C_CHARSET_TH) == TRUE) { + *p = 't'; + *(p + 1) = 'h'; + c_unicode_subst(filename); + } + if (*(p + 1) == 0x9f) { + *p = 's'; + *(p + 1) = 'z'; + c_unicode_subst(filename); + } } if (*p == 0xce) { if (*(p + 1) == 0xbc) { diff --git a/src/c_subst.h b/src/c_subst.h index 124dcf5..00073b2 100644 --- a/src/c_subst.h +++ b/src/c_subst.h @@ -61,6 +61,8 @@ "\x91\xb1" #define C_CHARSET_DH \ "\x90\xb0" +#define C_CHARSET_TH \ + "\x9e\xbe" #define C_CHARSET_C \ "\x87\xa7" #define C_CHARSET_E \ @@ -69,6 +71,8 @@ "\x99\x9a\x9b\x9c\xb9\xba\xbb\xbc" #define C_CHARSET_I \ "\x8c\x8d\x8e\x8f\xac\xab\xac\xad" +#define C_CHARSET_Y \ + "\x9d\xbd\xbf" struct lfiles_s* c_subst_filenames(struct lfiles_s*, const bool_t, const bool_t, const unsigned char); diff --git a/src/c_unixize.c b/src/c_unixize.c index eac2eb3..1866ac7 100644 --- a/src/c_unixize.c +++ b/src/c_unixize.c @@ -133,7 +133,8 @@ main og_files->filename, new_files->filename, strlen(new_files->filename) + 1 - ) != 0 + ) != 0 && + new_files->filename[0] != 0x00 ) { if (opts.verbose == TRUE) { dprintf( |