Written by

Technical Consultant at Traverse Health
MOD
Question Muhammad Waseem · Aug 4, 2021

How to check if string contains Unicode characters?

Hi,

How to check if data string contains Unicode characters?

Thanks

Product version: IRIS 2021.1

Comments

Julius Kavay · Aug 4, 2021
if $ziswide(string) { write "Yes" } else { write "No" }
0
Julius Kavay · Aug 4, 2021

By the way, if you ever have to check, if a string does contain ASCII chars only (0x00 - 0x7F), there is a simple trick:

if $zconvert(string,"O","UTF8")=string { write "7bit only" } else { write "chars with 8 or more bits" }
0