Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ hankakuzenk(3X) — HP-UX 7.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

open_jlib(3X)

HANKAKUZENKAKU(3X)

NAME

HankakuZenkaku, ZenkakuHankaku  − translate characters

SYNOPSIS

#include <jlib.h>

unsigned char *HankakuZenkaku (s1, s2, mode)
unsigned char *s1, *s2;
int mode;

unsigned char *ZenkakuHankaku (s1, s2)
unsigned char *s1, *s2;

DESCRIPTION

The arguments s1 and s2 point to strings (arrays of characters terminated by a null character). 

HankakuZenkaku copies string s1 to s2 translating 8-bit special, 8-bit alphanumeric, and HANKAKU KATAKANA characters to the corresponding 16-bit ones.  HANKAKU KATAKANA characters are translated to HIRAGANA or KATAKANA characters based on mode. The argument mode must be one of the following:

toHiragana translate to HIRAGANA characters (default)

toKatakana translate to KATAKANA characters

where default indicates which value is taken if neither value is specified. 

If some characters in s1 can be translated into the set of 8-bit special, 8-bit alphanumeric, and HANKAKU KATAKANA characters, ZenkakuHankaku copies string s1 to s2 translating them.  Otherwise, it copies without translating. 

DIAGNOSTICS

Each function returns s2 upon successful completion. Otherwise, a NULL pointer is returned. 

WARNINGS

ZenkakuHankaku copies the following characters, which are expressed by section-point code, without translating them because there are no characters corresponding to them in kana(8).

04-78
04-80
04-81
05-78
05-80
05-81
05-85
05-86

A KATAKANA character with DAKUON or HANDAKUON is translated to two HANKAKU KATAKANA characters followed by DAKUTEN or HANDAKUTEN, and vice versa. 

Neither function checks for overflow of any input string.  In HankakuZenkaku the length of the resultant string is not greater than twice the length of s1. In ZenkakuHankaku the resultant string is shorter than s1. 

SEE ALSO

open_jlib(3X)

Hewlett-Packard Company  —  HP-UX Release 7.0: Sept 1989

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026