Subject: Re: bug#71822: Feature request: fullwidth to halfwidth

From: Kazuhiro Ito <[email-masked]>
Date: Sun, 30 Jun 2024 18:43:55 +0900

> EZ> use cases for these commands
> 
> All offline (I. e. all by hand), I start out with English,
> 
> 1. Her ID number is 0987654321BA.
> 
> I rewrite the first part in Chinese,
> 
> 2. 她證號為 0987654321BA 。
> 
> But to get it into its final state,
> 
> 3. 她證號為０９８...
> 
> I need to retype each and every number and letter "all over again" (but
> in fullwidth), because there is no M-<something> command to change it
> for me. As you see I have given up halfway.

FYI, We have japanese-hankaku[-region] and japanese-zenkaku[-region]
functions, which convert hankaku (halfwidth) and zenkaku (fullwidth)
characters to one another.  It is useful to normalize mixed text
mainly input by someone not me, though these functions don't support
all characters because they are for traditional Japanese character
set.

> japanese-hankaku is an autoloaded native-comp-function in
> ‘japan-util.el’.
>
> (japanese-hankaku OBJ &optional ASCII-ONLY)
>
> Convert argument to ‘hankaku’ and return that.
> The argument may be a character or string.  The result has the same type.
> The argument object is not altered--the value is a copy.
> Optional argument ASCII-ONLY non-nil means to return only ASCII character.

-- 
Kazuhiro Ito