Originally Posted By: fogman
The problem is here:
str_pointer = str_create("NULL");

Basically, if you work with Unicode, you can´t simply define any string directly in c or h files. You have to read all strings from textfiles, even for comparisons. Think about it: You try to compare ASCII with unicode, this won´t work.

Solution: Read "NULL" from a unicode textfile into str_pointer.


Your solution is good, but I tried this before.
It's not correct working.

//--------------------------
1. Working:

Textfile:
"NULL"

file = file_open_read("file.txt");

file_str_readtow(file,str1,NULL,5000); // str1 includes "NULL" from textfile

if(str_cmpni(str1,str_pointer)==1){sys_exit("");} // str_pointer includes "NULL" from other file

file_close(file);

//--------------------------
2. NOT Working: ( This is the needed )

Textfile:
"Hello"
"NULL"

file = file_open_read("file.txt");

file_str_readtow(file,str1,NULL,5000); // str1 includes "Hello" from textfile
file_str_readtow(file,str2,NULL,5000); // str1 includes "NULL" from textfile

if(str_cmpni(str2,str_pointer)==1){sys_exit("");} // str_pointer includes "NULL" from other file

file_close(file);

//------------------------------

It seems like it's not working if it's not the first string from the textfile.