Go to main content

man pages section 3: Basic Library Functions

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

wctrans_ja (3C)

Name

wctrans_ja - Wide character conversion for the Japanese locale

Synopsis

#include <wchar.h> 

wctrans_t wctrans(const char *
property);

Description

wctrans() builds values in wctrans_t data type according to the specification with the property argument to allow conversion between wide characters. towctrans() is used for actual conversion. wctrans() returns arguments that towctrans() needs to use.

The following character class names are defined in every locale.

  • tolower
  • toupper

In addition to the above, the Japanese locale (ja, ja_JP.PCK, and ja_JP.UTF-8) defines the following character classes specific to the Japanese locale.

  • tojhira
  • tojkata
  • tojisx0208
  • tojisx0201

These can be also used as property arguments to wctrans(). However, the use of these classes are limited to applications for the Japanese locale only.

tolower

Specifies conversion to lowercase alphabet wide characters.

toupper

Specifies conversion to uppercase alphabet wide characters.

tojhira

Specifies conversion of JIS X 0208 Katakana to Hiragana.

tojkata

Specifies conversion of JIS X 0208 Hiragana to Katakana.

tojisx0208

Specifies conversion of JIS X 0201 Roman character graphic set or Katakana character graphic set to the associated JIS X 0208 characters.

tojisx0201

Specifies conversion of JIS X 0208 characters to the associated JIS X 0201 Roman character graphic set or Katakana character graphic set.

Example 1 Converting a Wide Character to Hiragana

The following shows an example to convert a wide character wc to Hiragana.

towctrans(wc, wctrans("tojhira"))

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/locale for ja_JP.UTF-8, system/locale/extra for ja_JP.eucJP and ja_JP.PCK

See Also

towctrans(3C), wctrans(3C), wctype_ja(3C), PCK(7), eucJP(7)