sjis2utf8: Wrapper of iconv for Japanese encoding

Description Usage Arguments Details Value Author(s) See Also Examples

Description

These functions are to encode Japanese characters from SJIS/JIS/EUC-JP to UTF-8.

Usage

1
2
3

Arguments

x

A character vecter

CP932

logical. If you like to use Shift-JIS instread of CP932, set CP932 = FALSE. The default is TRUE

Details

The major Japanese encoding systems are Shift-JIS (CP932), JIS (ISO-2022-JP), EUC-JP, and recently UTF-8. Exchanging Japanese strings data between the different platforms is often the cause of unreadable illegal characters. Since iconv could be the solution of this issues, these functions are written for the handy use of iconv, in partifular, when importing an old dataset or from the different platform.

Value

A character vector

Author(s)

Susumu Tanimura aruminat@gmail.com

See Also

iconv and localeToCharset.

Examples

1
2
x <- iconv(zenkaku$upper, from="UTF-8", to="CP932")
sjis2utf8(x)

Example output

Loading required package: stringr
[1] "<U+FF21><U+FF22><U+FF23><U+FF24><U+FF25><U+FF26><U+FF27><U+FF28><U+FF29><U+FF2A><U+FF2B><U+FF2C><U+FF2D><U+FF2E><U+FF2F><U+FF30><U+FF31><U+FF32><U+FF33><U+FF34><U+FF35><U+FF36><U+FF37><U+FF38><U+FF39><U+FF3A>"

Nippon documentation built on May 2, 2019, 1:03 p.m.