ofer.yishai Posted March 28, 2016 Report Share 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 Link to comment Share on other sites More sharing options...
Saragani Posted March 29, 2016 Report Share 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. Link to comment Share on other sites More sharing options...
ofer.yishai Posted April 4, 2016 Author Report Share Posted April 4, 2016 Thanks! I will try that Ofer Link to comment Share on other sites More sharing options...
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