Hi I'm trying to write a binary file (PSD) and have japanese language turned on on my computer right now. The program crashes when using fwrite, I think it has to do with that the system is using doublebyte characters. Things works fine when the system is set to another language like swedish. I hope you can help.
This is the function that crashes, during fwrite:
Do you know why?Code:bool PSDFile::writeSignedInt(int valueToWrite) { size_t ret = fwrite(&valueToWrite,1,4,m_fd); if (ret==4) return true; return false; }
Do I need to check if the system is using doublebyte characters? How do I do that?
Do I need to adjust things regarding the arguments passed to fwrite?
Note that I'm not actually writing japanese letters at this point although I will need to do that as well, but it crashes here from just writing any characters it seems.
Thanks.



LinkBack URL
About LinkBacks


