Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

lowercase of katakana is not converted to uppercase(カタカナの小文字が大文字に変換されない)

kenber1
Discoverer
0 Kudos

大文字に変換する機能はありますか?

5 REPLIES 5

JoeyLi
Product and Topic Expert
Product and Topic Expert

In ABAP, there is no built-in function to convert lowercase katakana characters to uppercase. However, you can achieve this by using Unicode conversion functions and tables. something like below coding.

DATA: lv_input TYPE string VALUE 'カタカナの小文字',
lv_output TYPE string.
DATA: lt_input TYPE STANDARD TABLE OF string,
lt_output TYPE STANDARD TABLE OF string.
lt_input = cl_abap_conv_in_ce=>create( )->convert( lv_input ).
LOOP AT lt_input INTO DATA(lv_char).
CASE lv_char.
WHEN 'ァ' TO 'ヶ'.
lv_char = cl_abap_conv_out_ce=>create( )->convert( lv_char ).
ENDCASE.
APPEND lv_char TO lt_output.
ENDLOOP.
lv_output = cl_abap_conv_in_ce=>create( )->convert( lt_output ).
WRITE lv_output.

Sandra_Rossi
Active Contributor
0 Kudos

Microsoft Translator of 大文字に変換する機能はありますか?:

Is there a capability to convert to uppercase?

Sandra_Rossi
Active Contributor
0 Kudos

I don't know "case for katakana", do you have an example of one symbol lower case and its equivalent symbol in upper case?

Note that the functions to_upper and to_lower don't seem to vary on the linguistic environment restrictions, so I guess they should work.

Also, from ABAP 7.55 I guess that PCRE Regular Expressions would be able to convert correctly lower case to upper case of any Unicode character and vice versa (based on the Unicode character classes). See the example code in the ABAP documentation.

Sandra_Rossi
Active Contributor
0 Kudos

Do you have an example of one symbol lower case and its equivalent symbol in upper case?

raymond_giuseppi
Active Contributor

I'm looking forward to seeing examples of uppercase and lowercase in Katakana, as I thought this script was unicase (or are you asking for half/full width characters?)

Have you looked for such converters (Web Services) on the Web, like a Katakana / Hiragana / Kanji converter for example.