Convert string half width to full width and vice versa?


#1

Hi I am looking for conversion of half width to full width and vice versa of Japanese characters in uipath, I tried using strconv but it didn’t worked .
Example
ラーメン" to “ラーメン” and vice versa and it should do it for spaces and numbers also.

Regards
Nara


#2

Hi Nara,

Have you tried the following?

  • StrConv("ラーメン 123", vbNarrow, 1041)
  • StrConv("ラーメン 123", vbWide, 1041)

This works even on my non-Japanese system, because 1041 explicitly specifies the “LocaleID” to use for the input, in this case of Japanese. If not specified, it uses the system locale and certain conversion methods may not do anything, which I think is what happened to you. And yes, the LocaleIDs are totally arbitrary numbers, it’s probably good to leave a note in the workflow about why you put it in there.

Hope this helps,
Steven