is.Vietnamese: Determining if a UTF-8 string is within the Vietnamese...

Description Usage Arguments Value Author(s) Examples

Description

is.Vietnamese returns TRUE if a UTF-8 string is within the Vietnamese Unicode ranges

Usage

1
is.Vietnamese(utf8char)

Arguments

utf8char

UTF-8 string

Value

logic

Author(s)

Jose' Gama

Examples

1
2
3
4
5
fileIn<-system.file('extdata/TextVietnamese.txt', package='utf8latex')
# read a UTF-8 string from a file
x <- scan(file=fileIn,'character', fileEncoding='UTF-8')
# check if every character is within the Vietnamese Unicode ranges
lapply(unlist(strsplit(x,'')), is.Vietnamese)

Example output

Read 1 item
Warning message:
In scan(file = fileIn, "character", fileEncoding = "UTF-8") :
  invalid input found on input connection '/usr/local/lib/R/site-library/utf8latex/extdata/TextVietnamese.txt'
[[1]]
[1] FALSE

[[2]]
[1] FALSE

utf8latex documentation built on May 2, 2019, 6:16 p.m.