Open Takym opened 1 year ago
The idea of using half-width katakanas instead of full-width is suggested in https://github.com/microsoft/winfile/pull/272#issuecomment-1310330939 Thanks
The current e.g Explorer uses half or full width?
Currently, most of the software and documents use full-width. The half-width katakanas were introduced for legacy computers because Japanese characters are in large quantities.
I disagree with adding an option to switch between half-width and full-width katakanas. The reason is that maintaining two japanese-language resource files with little difference.
I think it is better to use full-width katakanas, because this branche's source codes are new Windows File Manager and no longer 90's (WindowsNT 4.0) version. (example OLE drag/drop support)
I think adding two variants (full-width and half-width katakanas) of language resources can be a low-maintenance cost by an automating tool like the one below: https://github.com/Takym/winfile/tree/Japanese_Hankaku/tools/ConvertFromFullWidthToHalfWidth This tool replaces all full-width katakanas with half-width. So, you only need to update the full-width one.
I think adding two variants (full-width and half-width katakanas) of language resources can be a low-maintenance cost by an automating tool like the one below: https://github.com/Takym/winfile/tree/Japanese_Hankaku/tools/ConvertFromFullWidthToHalfWidth This tool replaces all full-width katakanas with half-width. So, you only need to update the full-width one.
Besides the correctness, what about a PowerScript equivalence? 😄 (maybe 7.x only though. Add locale id of ja-JP for multilingual systems. But this code seems to be working only on computers with Japanese language pack installed...)
using namespace Microsoft.VisualBasic
[System.Text.Encoding]::RegisterProvider([System.Text.CodePagesEncodingProvider]::Instance)
[Strings]::StrConv('キャンセル取消すキャンセル', [VbStrConv]::Narrow, 0x0411)
@clzls
Besides the correctness, what about a PowerScript equivalence?
Yes, it seems good. I will port the conversion tool to PowerShell.
But this code seems to be working only on computers with Japanese language pack installed...
Thank you for telling me that Strings.StrConv
does not work in non-Japanese environments. But I'm sorry, I have no idea how to fix it.
I have ported the conversion tool to PowerShell: https://github.com/Takym/winfile/blob/Japanese_Hankaku/tools/ConvertFromFullWidthToHalfWidth.ps1
I used the pwsh
command to run PowerShell 7.3.
The idea of using half-width katakanas instead of full-width is suggested in #272 (comment) Thanks
I give up that thought now. Let's say hello to full-width Katakana, since original_plus
or any customized fork would serve the needs, because one can easily make a fork with old-fashioned half-width Katakana themselves using the script.
Maybe it is the time to establish a community agreement for ja-JP translations based on this issue now. (Since everyone here now agree with it...?)
Thank you for telling me that
Strings.StrConv
does not work in non-Japanese environments. But I'm sorry, I have no idea how to fix it.
Windows Japanese language pack is nothing other than a regular dependency of the script. Done 😄 (I have Japanese language pack installed, and I'm in Chinese environment, it worked fine.)
My PR #272 replaces all half-width katakanas with full-width katakanas because the full-width one is more readable. However, this software also shows how did it work in the 1990s. So, I think providing an option to switch is nice for users. The full-width one is for readability, and the half-width one is for learning the historical way.