Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: 31164
  • Order by date
  1. 31164

    stat() help

    I have found a solution from a forum. It seems that I need to do memcpy. wchar_t* getFilename8(jstring filename, JNIEnv * env){ ... ... filename8 = (*env)->GetStringChars( env, filename, NULL ); _wrtn = (wchar_t*)malloc(sizeof(wchar_t)*len+1); memcpy(_wrtn, filename8, sizeof(wchar_t)*len)...
  2. 31164

    stat() help

    Thank you, Salem. I have tried it and it works too. But in the code, you write wchar_t fn1[] = L"file\u0395\u03c7.txt"; Is there any way to pass it as variable? For example: let filename = "file\u0395\u03c7.txt"; and wchar_t fn1[] = L(filename); The problem is filename is a value pass to a...
  3. 31164

    stat() help

    the two letters are greek symbols. \u0395 = GREEK CAPITAL LETTER EPSILON \u03c7 = GREEK SMAL LETTER CHI
  4. 31164

    stat() help

    sorry, another typo. i write "\u0395\u03c7" since the two characters are converted into ?? after i am posting it to the forum. In the file system, it looks like c:\temporary_test\sample_test\??.txt the print looks like c:\temporary_test\sample_test\Εχ.txt
  5. 31164

    stat() help

    sorry... stat() does return 0. so the bug is coming from getfilename8
  6. 31164

    stat() help

    Oh ya that's a typo. I believe that I am at the right directory. the fullpath is "c:\temporary_test\sample_test\\u0395\u03c7.txt.txt" The issue that is still bugging me is the return value from stat. As I mention before, I use fopen to detect the existence of the file. If it returns NULL...
  7. 31164

    stat() help

    I have changed the code so that it checks the return value from stat(). But still, it returns 12/15/1992 04:34:08.... When I try to detect the file using fopen(), it returns NULL. Somehow stat() returns 724466048 not 0. I have also printed the value of rtn, and it shows the right name. I am...
  8. 31164

    stat() help

    I am running it on windows. filename: "\u0395\u03c7.txt" I am sorry. I did not notice that the 2 characters are translated as ??. JNIEXPORT jlong JNICALL Java_getAccessedDate (JNIEnv * env, jclass obj, jstring filename){ struct _stat statfile; char* rtn = getFilename8(filename, env)...
  9. 31164

    stat() help

    I have a filename with UTF-8 encoded characters, and I am trying to grab the date created from stat(). For example: the filename is ??.txt I manage to get the correct filename using WideCharToMultiByte(), but stat() gives the wrong value. the correct value of date created: 8/4/2006 10:35:38...

Part and Inventory Search

Back
Top