I am trying to convert char*
to QString
. It should be a trivial task but the problem is, I am having the following input:
item char [512] "N" char [512]
[0] 78 'N' char
[1] 0 '\0' char
[2] 73 'I' char
[3] 0 '\0' char
[4] 70 'F' char
[5] 0 '\0' char
[6] 84 'T' char
[7] 0 '\0' char
[8] 89 'Y' char
[9] 0 '\0' char
[10] 0 '\0' char
Notice the null character after each character '\0'. Simply trying to convert it just yields the string "N" where as it should result into string "NIFTY".
I am not sure if it is unicode or Ansi string
(in fact I don't know much about it). Can anyone please sort out what is going wrong here or what am I missing?