ofer.yishai Posted March 28, 2016 Report Posted March 28, 2016 Hi all, Anyway to convert between string types? I would like to store an ASCII string to Data Sampler/User Comment 1 string that is build as UTF-32. while compiling the app get an error: Data type mismatch. Thanks in advanced, Ofer
Saragani Posted March 29, 2016 Report Posted March 29, 2016 For English characters and digits, the conversion is easy. Each byte in the ascii is being copied to the lower byte of the matching 4 bytes. (each byte is being padded with 3 "nulls"). You need use a buffer. Clear it first, iterate the ASCII string, and copy the character in index i to the buffer at offset i*4 Then use Buffer to tag in order to copy the result to a UTF32 tag.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now