All Functions

unicode - unicode characters

The Unicode function returns all types of character for multiple languages (also UTF-8).

Unicode contains special languages and graphical characters not commonly used in standard Latin texts.

Unicode characters are perfect to test input fields in your application and verify how texts are stored in the database. If you want to upset your DBA use the pattern below to generate random characters from the "Unified Canadian Aboriginal Syllabics" unicode range :)

unicode(60,24) - will generate 60 characters from range 24 (Unified Canadian Aboriginal Syllabics)

If you want to copy & paste these characters to another program, make sure the target application is UTF-8 encoded.

Unicode / UTF-8 ranges & references:

Usage(s)

unicode () Returns a printable unicode character from any of the predefined ranges.
unicode ( $length ) Returns a string of Unicode characters with a length of $length.
unicode ( $length , $rangeMin, $rangeMax ) Returns a string of unicode character with length $length in the unicode range $rangeMin to $rangeMax
unicode ( $length , $range ) Returns a string of unicode character with length $length in the unicode range $range

Parameter(s)

$length The length of the string to generate
$rangeMin The minimum (decimal) range for the unicode character (Unicode Table)
$rangeMax The maximum (decimal) range for the unicode character (Unicode Table)
$range

The predefined range that the generator engine uses to pick characters from.

These are the supported pre-defined ranges:
#Range
0Latin
1Latin-1 Supplement
2Latin-Extended A
3Latin-Extended B
4IPA Extentions
5Greek and Coptic
6Cyrillic
7Cyrillic Supplementary
8Armenian
9Hebrew
10Arabic
11Syriac
12Thaana
13Devanagari
14Bengali
#Range
15Gurmukhi
16Gujarati
17Oriya
18Tamil
19Malayalam
20Thai
21Georgian
22Hangul Jamo
23Ethiopic
24Cherokee
25Unified Canadian Aboriginal Syllabics
26Khmer
27Khmer Symbols
28Mongolian
29Phonetic Extensions
#Range
30Latin Extended Additional
31Currency Symbols
32Letterlike Symbols
33Number Forms
34Arrows
35Mathematical Operators
36Enclosed Alphanumerics
37Box Drawing
38Geometric Shapes
39Miscellaneous Symbols
40Supplemental Arrows-B
41Kangxi Radicals
42CJK Symbols and Punctuation
43Hiragana
44Katakana
#Range
45Bopomofo
46Hangul Compatibility Jamo
47Enclosed CJK Letters and Months
48CJK Compatibility
49CJK Unified Ideographs Extension A
50CJK Unified Ideographs
51Yi Syllables
52Yi Radicals
53Hangul Syllables
54CJK Compatibility Ideographs
55Arabic Presentation Forms-A
56CJK Compatibility Forms
57Arabic Presentation Forms-B
58Mathematical Alphanumeric Symbols
59CJK Unified Ideographs Extension B

Example(s)

Basic unicode examples

unicode(50) - Will generate 50 unicode chars from all of the Unicode ranges.

Generating language specific characters

unicode(50,27) - will generate 50 printable characters from the 'Khmer Symbols' range.

Arrows

unicode(50,34) - Use this pattern if you like arrows ;)

See also

char - alphabetical character ascii - ASCII characters