| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >TOUNICODE (convert expression to Unicode) | [[toansi.htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[today return system date .htm|{{btn_next_n.gif|Next page}}]] | | || **TOUNICODE(string, codepage)** {{blk2blue.jpg|blk2blue.jpg}} | **TOUNICODE** | Returns a string value converted to Unicode using the encoding of the Codepage parameter | | //string// | A string constant, variable, or string expression | | //codepage// | Codepage used for encoding | The **TOUNICODE** function returns a string value converted to Unicode using the encoding of the Codepage parameter. The second parameter allows for conversions to Unicode strings encoded for a different codepage than the current codepage in use by the OS. The TOUNICODE function also allows to convert ANSI and Unicode strings to a character sequence encoded in UTF-8 by passing the value **65001** as the second parameter. **Return Data Type:    Unicode string** **example:** idname ustring(40) UTFid   ustring(40) | CODE | | | idname = 'widget' | | | UTFid = TOUNICODE(idname, 65001)  ! encoded to UTF8 | **See Also:** [[toansi.htm|TOANSI]] [[internationalization.htm|Internationalization]]