Skip to contents

All CJK characters in the file(s) found at the specified path are substituted by their Unicode escape sequences (\u + 4 digit hex number or \U + 8 digit hex number where necessary).

Usage

cjk_escape(path, outdir = NULL, verbose = TRUE)

Arguments

path

the path to a directory or a single file.

outdir

the directory where the output files are written. Defaults to the subdirectory out of the directory in path. The output files have the same names as the originals.

verbose

whether to print a message for each output file.

Value

No return value, called for side effects.

Details

If path is a directory, the replacement is performed for all files at that location (subdirectories are ignored). If outdir is the same as path, the original files are overwritten without warning.

If path is a file, the replacement is limited to this file. If outdir is the same as dirname(path), the files are overwritten without warning.